use File::stat; printf qq(File size with "File::stat" is %s\n), stat($filename)->size;