Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Using IF and OR, I'm sure there is a better way

by robin (Chaplain)
on Dec 16, 2005 at 01:40 UTC ( #517123=note: print w/replies, xml ) Need Help??


in reply to Using IF and OR, I'm sure there is a better way

In Perl 5.10, you'll be able to do:
use feature '~~'; if ($variable ~~ [1,2,3]) { ... }
which will indeed short-circuit.

(I'm backporting the Perl 6 "smart match" operator to Perl 5.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://517123]
help
Chatterbox?
[marto]: and you still can't get a decent cup of tea in that town
[davies]: The turnout, IIRC, was about 12%.
[< & >]: 12% seriously? =)
NodeReaper thinks he was bad enough with one account \:

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-12-15 19:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (442 votes). Check out past polls.

    Notices?