Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Flag variables

by Bilbo (Pilgrim)
on Mar 03, 2003 at 10:54 UTC ( #239995=note: print w/replies, xml ) Need Help??


in reply to Flag variables

I don't know why this would be wrong, but I can see an alternative way of doing this:

foreach my $var (@somearray){ if($var eq "foo"){ &someaction; last; } }

Update: sorry for the duplicate reply - zby beat me to it

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://239995]
help
Chatterbox?
[Corion]: choroba: Just imagine how bad it must be without systemd ;-D
[choroba]: but I'm not sure it's worth my time...
NodeReaper shudders
[Corion]: choroba: That chart is frustrating as it pits cold hard numbers against puttering around with an annoying problem :)
[choroba]: I only use it when I want to avoid a task...
[Corion]: choroboa: A good choice! ;)

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-07-27 09:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (407 votes). Check out past polls.