Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^3: Range Operator in If Statement

by LanX (Chancellor)
on Jan 05, 2012 at 01:56 UTC ( #946313=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Range Operator in If Statement
in thread Range Operator in If Statement

When classifying by intervals, better try $case = int( ($ref-1) / 8 ) , so you only have to test for the results 0,1,2,3...

DB<104> for $ref (1,8,9,16,17,24,25,32) { print "$ref: ", int(($ref-1) +/8), "\n" } 1: 0 8: 0 9: 1 16: 1 17: 2 24: 2 25: 3 32: 3

Cheers Rolf

Comment on Re^3: Range Operator in If Statement
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2015-11-30 16:06 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (777 votes), past polls