Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Integer overflow in octal number

by Marshall (Canon)
on May 05, 2009 at 18:19 UTC ( [id://762002]=note: print w/replies, xml ) Need Help??


in reply to Integer overflow in octal number

I think we've got the overflow problem solved. I'd just like to make a suggestion re: loop conditions.
my @temp_reference_value = ("111", "11111111"); for(my $i=0; $i<=$#temp_reference_value; $i++ ) { ... use $temp_reference_value[$i] here ... }
is not the Perl way of doing things. One of the magic things about Perl is that @var knows how big it is and there are better iterators than this C style for loop!
foreach my $value (@temp_reference_value) { .. use unsubsripted $value here ... .."off by one" won't happen... a big advantage! }
Is a more Perl way of doing things!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-19 21:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found