Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: (jeffa) 2Re: (Ovid - Why I love nested If-Else blocks)

by runrig (Abbot)
on Jan 04, 2002 at 03:46 UTC ( [id://136146]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $func = ($foo > 7) ?
         $bar && \&bar_mysub
    ...
      :  $bar && \&bar_other_mysub
      || $baz && \&baz_other_mysub;
    $func->($foo) if $func;
    
  2. or download this
    my $func = ( $foo > 7 )
      ? $bar && \&bar_mysub
    ...
      || $bam && \&bam_other_mysub
      || $bak && \&bak_other_mysub;
    $func->($foo) if $func;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://136146]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2024-04-18 17:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found