Beefy Boxes and Bandwidth Generously Provided by pair Networks kudra
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: while loop question

by hbm (Hermit)
on Sep 06, 2012 at 13:34 UTC ( #992086=note: print w/ replies, xml ) Need Help??


in reply to while loop question

Another possibility:

my $match = 9; my @loop = (0..5); for my $v (@loop,undef) { if (!defined $v) { say "not found"; } elsif ($v == $match) { say "found"; last; } }


Comment on Re: while loop question
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-04-17 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (441 votes), past polls