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

portably finding max integer

by martin (Friar)
on May 24, 2009 at 16:46 UTC ( #765935=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # solution 1
    use Config;
    ...
    else {
      # max_integer is probably 2**31-1
    }
    
  2. or download this
    # solution 2
    my $max_int = (-1)>>1;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://765935]
Approved by Corion
Front-paged by Corion
help
Chatterbox?
[atcroft]: Lady_Aleena: Understandable.
[Lady_Aleena]: However, in this instance, the script will grow much larger, while the module will shrink.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2017-05-29 02:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?