Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: ARGV and online Perl commands

by 2teez (Vicar)
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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012745]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2018-06-18 03:02 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (107 votes). Check out past polls.