Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Syntactic Confectionery Delight
 
PerlMonks  

Re: Nested OR as a control structure

by bobn (Chaplain)
on Jun 02, 2004 at 23:20 UTC ( [id://359905]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Nested OR as a control structure

So if you want to use:
tryfirstchoice() or trysecondchoice() or trynextchoice or .... trylast +choice();
then why not just do so?
#!/use/bin/perl -lw tryfirstchoice() or trysecondchoice() or trylastchoice(); sub tryfirstchoice { print "tryfirstchoice"; return; } sub trysecondchoice { print "trysecondchoice"; return 1; } sub trylastchoice { print "trylastchoice"; return 1; } <code> Running this produces: <code> # perl or.pl tryfirstchoice trysecondchoice #

--Bob Niederman, http://bob-n.com

All code given here is UNTESTED unless otherwise stated.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://359905]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.