use File::Stat; my $size = (stat($filename))[7]; print "File size with \"File::Stat\" $size \n";