Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 romping around the Monastery: (6)
As of 2015-08-30 09:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (348 votes), past polls