Perl bug: Error when get size of big files?

In Perl, to get file size we use : $size = -s "filename".
I used this to compute size of 2Gb file but nothing happens when call print $size! Suggest this is a Perl’s bug.
-> should try sprintf command instead of print.

I did try again and it print fine using sprintf("%.0f bytes",$size) ;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: