Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: alternatives to if and series of elsif

by BrowserUk (Patriarch)
on Jul 03, 2005 at 05:31 UTC ( [id://471989]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #! perl -slw
    use strict;
    ...
    Before: 17000 :    15 After: 17000 :    23
    Before: 18000 :    23 After: 18000 :    15
    Before: 19000 :    15 After: 19000 :    24
    
  2. or download this
    use constant STICK => pack 'C*', 15, map( ($_) x 2, 15 .. 23 ), (24) x
    + 100;
    sub stick{
    ...
        my $q = STICK2->[ 1 + $_[0] / 1000 ];
        return $q < $_[1] ? $_[1] : $q;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-24 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found