in reply to Re: Re: Getting file size
in thread Getting file size

aha. and what is the error message you are getting?
and be sure to change the last line to
unless (defined $size) {...}
, as aristotle correctly suggested.
it is always a good idea to log important issue to a file which either is specified in the script itself or can be specified via command line. any fatal error is an important issue.