Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: ARGV and online Perl commands

by toolic (Bishop)
on Jan 10, 2013 at 19:32 UTC ( #1012723=note: print w/replies, xml ) Need Help??


in reply to ARGV and online Perl commands

Here's what I get at my unix prompt:
perl -e "print $ARGV[1];" ONE- TWO- ARGV: Undefined variable.

But, if I change to single quotes to make my shell happy:

perl -e 'print $ARGV[1];' ONE- TWO- TWO-

UPDATE: when I switch my shell from tcsh to bash, I can duplicate your result.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1012723]
help
Chatterbox?
[Lady_Aleena]: Corion, I knew that, I was just giving Discipulus a hard time.
choroba likes the story at the end of the node
[choroba]: reminds me of the days at the bank
[Corion]: Lady_Aleena: Hehe ;-D
[Lady_Aleena]: Corion, it was PerlMonks who kept pushing me to get Linux, so now I know some of the commands to use in word play.
[Corion]: Lady_Aleena: :-D
[Lady_Aleena]: Corion, so do you think the gods would be open to taking over Cookies should I disappear for too long a time?

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2017-04-26 08:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (471 votes). Check out past polls.