Running Perl from the Win32 command-line shell

 

To execute command-line perl in a Windows shell, everything needs to be in double-quotes.

 

Remember, if you want control-characters interpolated, you must use double-quotes, not single quotes. Which means they must be escaped:

 

perl -e "if ('hello' eq 'hello') {print \"yes!!!\n\n\";}"

 

see more on one-line escapement and Stack Overflow’s why doesn’t my one-line work?

 

 

more one-liners and notes

http://sial.org/howto/perl/one-liner/
Perl as a command-line utility
http://www.unixguide.net/unix/perl_oneliners.shtml
SO:one-liner

 

 

See Also

Command Line Wild Card
Win32
Learning Perl Win 32

 

 

Category tags

Perl Programming shell win32