in reply to bad results from stat()

You could even use the core module File::stat to access the field by name. See perldoc File::stat and use something along these lines (untested):
use File::stat; $st = stat($file) or die "No $file: $!"; printf "Size: %d, mtime: %d", $st->size(), localtime($st->mtime());