Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: ARGV and online Perl commands

by 2teez (Priest)
on Jan 10, 2013 at 21:30 UTC ( #1012745=note: print w/ replies, xml ) Need Help??


in reply to ARGV and online Perl commands

"...Is there something I'm missing? .."

Previous comments are true, when you are on UNIX systems, but reverse is the case on Win systems.
This example

perl -e "print $ARGV[1];" ONE- TWO- ## prints TWO-
works as expected on Win system. But with single-quotes, you get this error message: Can't find string terminator "'" anywhere before EOF at -e line 1.

In fact, perlrun has this to say: ...On some systems, you may have to change single-quotes to double ones, which you must not do on Unix or Plan 9 systems...

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me


Comment on Re: ARGV and online Perl commands
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2014-10-26 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (151 votes), past polls