Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Flag variables

by Bilbo (Pilgrim)
on Mar 03, 2003 at 10:54 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://239995]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2024-03-28 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found