Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2018-08-18 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:









    Results (185 votes). Check out past polls.

    Notices?