You should check if the file system supports atime at all before trying to use it. My guess is that on your system, $sb->atime did not return something usable that localtime could use. In fact, I'm wondering a bit that your localtime seems to return objects, but that may or may not be.
In the end, maybe some code $at ||= localtime or some other sensible default for $at should make your script work in the cases where atime does not return a sensible value.
In reply to Re: Invalid File Handle???
by Corion
in thread Invalid File Handle???
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |