in reply to Edit STDIN

I know that probably the last thing you want is another thing to learn but, this is the kind of thing a good programmer's editor can do for you.

Alternately you can type your code into your whatever editor you have. Then <cut> your code into the scratchpad. After running: "perl -d" <Paste> your code into the debugger. Typing "c" will execute your code.

After using your editor to make changes to your code, type "R" and paste your new code.

If you insist on writing something yourself I would highly recommend copying heavily from something like Text::LineEditor


s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}