Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Perl Monk, Perl Meditation
 
PerlMonks  

Re: if statement consolidation

by choroba (Prior)
on Jun 27, 2012 at 16:19 UTC ( #978712=note: print w/ replies, xml ) Need Help??


in reply to if statement consolidation

What about

if ($h > 0 and $h <= 16 and $h % 2 == $h < 9) { my $n = int(($h + 1) / 2); $j = $h + $n; $p = 0 + ! ($n % 2); $v = $n + (8 * ($h < 10)); }
Update: "if" condition added.


Comment on Re: if statement consolidation
Download Code
Re^2: if statement consolidation
by moritz (Cardinal) on Jun 28, 2012 at 10:16 UTC
      Thanks, added.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2013-05-25 21:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (521 votes), past polls