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?