use strict; use warnings; my $file = 'find_my_size.tar.gz'; my $size = -s $file; print "size of $file by -s is $size\n"; my @filedata = stat $file; print "size of $file by stat is $filedata[7]\n";