in reply to (tye)Re: piping commands to perl via standard input on the Win32 command line
in thread piping commands to perl via standard input on the Win32 command line

The problem is that Win32's "echo" preserves the quotes and so is poorly suited for this task- tye

That's why you shouldn't echo quotes unless you mean for perl to see them as for example, this in CMD:

echo system("time /T") ; print "\nHello world!\n" | perl -w

10:47a
Hello world!
mkmcconn
fiddled with example
  • Comment on Re: (tye)Re: piping commands to perl via standard input on the Win32 command line
  • Download Code

Replies are listed 'Best First'.
(tye)Re2: piping commands to perl via standard input on the Win32 command line
by tye (Sage) on Jan 10, 2002 at 00:03 UTC

    "echo" still isn't well suited for this. Many (even "most") Perl scripts will contain characters that Win32 command prompts won't give to "echo" (unless you put them in quotes which "echo" is too stupid to strip). In particular, < > | & ^ will cause problems while % might or might not be left alone.

            - tye (but my friends call me "Tye")