Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Perl & NT

by azatoth (Curate)
on Jun 11, 2001 at 15:28 UTC ( [id://87448]=note: print w/replies, xml ) Need Help??


in reply to Perl & NT

Change the ' for ". In Windows, specifically CMD, ' won't work.

So in this instance, all you're sending to perl is : perl -e `$_, and the rest of the line is parsed by CMD, including the pipes.

Your correct code should look like this :
which date | perl -e "$_ = <STDIN>; $_ =~ s|/|\\|g; print $_;"
P.S You need the MKS toolkit installed on your machine to in order to run the which command.

P.M.S Also use the code tags, to format any posted code in a nice, readable fashion.

Azatoth a.k.a Captain Whiplash

Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2024-04-19 10:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found