S
Sal
In the online Perl 5 version 12.1 documentation at:
http://perldoc.perl.org/perlnumber.html#Storing-numbers
Under the heading of Storing Numbers it reads "In fact numbers stored
in the native integer format may be stored either in the signed native
form, or in the unsigned native form."
Integers are *stored* as bits in a word, dword, or qword, it's how
they're interpreted that matters.
#!/usr/bin/perl
use strict;
use warnings;
my $x = 0xffff_ffff;
print $x, "\n";
printf("%d\n", $x);
On a 32-bit machine outputs:
4294967295
-1
http://perldoc.perl.org/perlnumber.html#Storing-numbers
Under the heading of Storing Numbers it reads "In fact numbers stored
in the native integer format may be stored either in the signed native
form, or in the unsigned native form."
Integers are *stored* as bits in a word, dword, or qword, it's how
they're interpreted that matters.
#!/usr/bin/perl
use strict;
use warnings;
my $x = 0xffff_ffff;
print $x, "\n";
printf("%d\n", $x);
On a 32-bit machine outputs:
4294967295
-1