Perl FTP - check file size

The FTP perl module does not have any function which checks if the file downloaded is of size 0. Is there any way in perl to check while getting the files through FTP?

Sometimes, there might be a problem with FTP and the downloaded file maybe of size 0. Hence, I would like to FTP that file again. That's why I want to check the file size so that I know if the FTP has succeeded.

Thanks,
Rahul.

check the size() method of Net::FTP module

if this is not what you want, you will have to use the -z or -s file test operators

operator = Meaning
-z = File has zero size
-s = File has nonzero size (returns size)