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?
[GotToBTru]: late to the conversation .. but thanks, Corion, for the reminder about Perl::Tidy
[Corion]: GotToBTru: Heh ;) I'm not really endorsing it, as I found that any gains made through it are easily squandered by the hours spent on configuring it. At least in my case :)
[GotToBTru]: Like most Swiss Army Knives, you can cut yourself trying to find the blade you actually want

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (11)
As of 2017-02-27 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (387 votes). Check out past polls.