in reply to Re: Executing a Dos command
in thread Executing a Dos command

You've got to be careful with <>, because it will also process command line arguments, which can lead to unexpected errors.

C:\>perl -e "<>;" -- foo Can't open foo: No such file or directory at -e line 1.

If a file named 'foo' actually exists, then a line would will be read from it, and the script will disappear as if this step was never taken.

I usually use <STDIN>; or if I am reliving my old habit of batch scripting, `pause`;. The pause approach will continue after any key press, not just 'ENTER', but it does spawn a shell. Choose your poison.


TGI says moo