in reply to comparing size
You could also use the core module File::stat which provides dev, ino, mode, nlink, uid, gid, rdev, size, atime, mtime, ctime, blksize, and block. I tend to find this easier than remembering what order stat returns things.
use File::stat; my $st = stat($file); my $size = $st->size;
gav^
|
---|