in reply to about int's

I believe the only restriction on an integer in Perl is the same restriction C ints are restricted by: the architecture (is there a more proper term?) of the chip. This is most likely 32 bits (unsigned?), but could be 64.

Update Oops. See Abigail's post below.

Replies are listed 'Best First'.
Re: about int's
by Abigail-II (Bishop) on Nov 08, 2003 at 23:05 UTC
    No, it's certainly *not* the same as C ints, and it's not necessarely directly related to size of registers on the hardware. For internal integers, you can get 32 bit or 64 bit integers (or perhaps even 128 bit integers) if your C compiler supports it.

    But under normal conditions, Perl (the language) doesn't have integers. It has numerical values. They may internally represented by integers, but if the need arises, they are seemlessly upgraded to floats. And you need to jump to some hoops to find out the internal representation. The precision of floats may vary from platform to platform, but it's typically 64 bits. This means that if your perl uses 32 bit integers internally, Perl (the language) still is able to deal with integer numbers of around 53 bits without losing precision.

    Abigail