jwb has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to get the file size of a file, but the target file is so large (about 10G) that it is overwhelming the poor variable that is trying to hold it.

I have experimented with Math::BigInt, but it seems that the stat->size already can't return the proper value, so it's already too late prepare a special object to hold it.

Any help would be appreciated. I have a lot of coding experience but am very new to Perl, so I need very clear instructions. Thanks in advance.

(I should add that I'm using ActivePerl on Windows XP)

Replies are listed 'Best First'.
Re: stat->size is too big for datatype
by Anonymous Monk on Jan 20, 2004 at 21:40 UTC
    You need to recompile perl with large file support and large 64bit ints

      Thanks, that set me in the right direction. This is Active Perl, so there's no recompile option available to me, but I did go and upgrade to the latest version, and it seems that the necessary support has been added.

      Thanks for the help.

        This is Active Perl, so there's no recompile option available to me,

        There is always a recompile option if you have a compiler (if you don't, well you don't).