Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The error message that i am receiving isuse strict; use warnings; my $bin_val; my $dec_val; my @temp_reference_value = ("11111111111111111111111111111111", "11111 +11111111111111111111111111"); for(my $i=0; $i<=$#temp_reference_value; $i++ ) { $dec_val = oct("$temp_reference_value[$i]"); $bin_val = sprintf('0x%x', $dec_val) if($dec_val); print "Bin value $temp_reference_value[$i] and Hex value is $bin_v +al \n"; }
Hence request your inputs in resolving this issue.Integer overflow in octal number at bintohex.pl line 11. Octal number > 037777777777 non-portable at bintohex.pl line 11. Bin value 11111111111111111111111111111111 and Hex value is 0xffffffff Integer overflow in octal number at bintohex.pl line 11. Octal number > 037777777777 non-portable at bintohex.pl line 11. Bin value 1111111111111111111111111111111 and Hex value is 0xffffffff
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Integer overflow in octal number
by JavaFan (Canon) on May 05, 2009 at 11:40 UTC | |
|
Re: Integer overflow in octal number
by irah (Pilgrim) on May 05, 2009 at 11:50 UTC | |
by Anonymous Monk on May 05, 2009 at 12:28 UTC | |
|
Re: Integer overflow in octal number
by vinoth.ree (Monsignor) on May 05, 2009 at 11:37 UTC | |
|
Re: Integer overflow in octal number
by Marshall (Canon) on May 05, 2009 at 18:19 UTC |