Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: @ARGV in while loop

by lightoverhead (Pilgrim)
on Feb 14, 2014 at 17:59 UTC ( #1074986=note: print w/replies, xml ) Need Help??


in reply to Re: @ARGV in while loop
in thread @ARGV in while loop

Thank you BrowserUK. You are right. It's good to learn.

what about this:

for(;;){ print "3:\t$ARGV[0]\n"; #cannot print either last; }
Is $ARGV[0] consumed too?

Replies are listed 'Best First'.
Re^3: @ARGV in while loop
by lightoverhead (Pilgrim) on Feb 14, 2014 at 18:39 UTC

    my fault

    I put for(;;;) after while().

    if run for(;;) first, it will print $ARGV[0]

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2018-07-21 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (444 votes). Check out past polls.

    Notices?