in reply to piping commands to perl via standard input on the Win32 command line
Generally, when the STDOUT of a Win/DOS command misbehaves (from my UNIX-y expectations), especially where CMD.EXE's builtin commands are involved (e.g., echo), I have found that prefixing the command with CMD /c often does the trick.
That is, instead of:
echo "print qq(Hello.\n)" | perltry this:
cmd /c echo "print qq(Hello.\n)" | perlI use this primarily for capturing output from .BAT and .CMD files, but the builtin commands don't always work right either.
dmm
You can give a man a fish and feed him for a day ...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: piping commands to perl via standard input on the Win32 command line
by frag (Hermit) on Jan 11, 2002 at 21:40 UTC |