Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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; } }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2017-05-28 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?