Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by mkmcconn (Chaplain)
on Jan 09, 2002 at 23:49 UTC ( #137540=note: print w/replies, xml ) Need Help??


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")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://137540]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2023-02-08 23:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (44 votes). Check out past polls.

    Notices?