C:\Users\Tux>perl -V:ptrsize
ptrsize='4';
C:\Users\Tux>perl -V:ivsize
ivsize='4';
C:\Users\Tux>perl -V:nvsize
nvsize='8';
C:\Users\Tux>
Note that ptrsize shows the size of the pointers. The length 8 indicates 64bit pointers. But even on 32bit perl installations, you can have 64bit integers: when perl was built with -Duse64bitint, and long doubles: when perl was built with -Duselongdouble.
To solve a problem that needs native huge numbers that do not fit in 32bit integers, having a perl that supports 64bit integers is often enough. Here's such a perl on a 32bit Linux with both
tux > perl -V:ptrsize
ptrsize='4';
tux > perl -V:ivsize
ivsize='8';
tux > perl -V:nvsize
nvsize='12';
tux >
compare that to a build without -Duselongdouble on the same machine:
tux > perl5.8.8 -V:ptrsize
ptrsize='4';
tux > perl5.8.8 -V:ivsize
ivsize='8';
tux > perl5.8.8 -V:nvsize
nvsize='8';
tux >
and this is on 64bit Linux:
tux > perl -V:ptrsize
ptrsize='8';
tux > perl -V:ivsize
ivsize='8';
tux > perl -V:nvsize
nvsize='16';
tux >
to complete this info story, -V: accepts perl regular expressions:
$ perl -V:.*size
charsize='1';
d_chsize='undef';
d_malloc_good_size='undef';
d_malloc_size='undef';
doublesize='8';
fpossize='16';
gidsize='4';
i16size='2';
i32size='4';
i64size='8';
i8size='1';
intsize='4';
ivsize='8';
longdblsize='16';
longlongsize='8';
longsize='8';
lseeksize='8';
nvsize='16';
ptrsize='8';
shortsize='2';
sig_size='69';
sizesize='8';
u16size='2';
u32size='4';
u64size='8';
u8size='1';
uidsize='4';
uvsize='8';
$
Enjoy, Have FUN! H.Merijn
|