On Wed, Nov 14, 2018 at 9:08 PM Tetsuo Handa < penguin-ker...@i-love.sakura.ne.jp> wrote
> how can I pass $sb->size to Math::BigInt->new() as a string (assuming that $sb->size is an integer) ? To answer the question, you can do: my $x = $sb->size; $value = Math::BigInt->new("$x"); But doing so is likely to be completely pointless. I'm thinking that the real problem is "How, on a 32-bit integer build of perl, does one get lstat() to return a correct value for 'size' when the size of the file is greater than 4294967295 bytes ?" I don't perform such exercises with perl, but I'm thinking that the answer to that question is "This cannot be done". Assuming that's correct, the simplest solution in my opinion is to build your perl with 64-bit integer support - which is something that can be done even with 32-bit compilers. Given that the OS knows the actual size of the file, another option would be to have perl query the OS, rather than calling lstat or stat. (I don't know the details of how to do that - it would depend to at least some extent on which OS you're running.) Cheers, Rob