> I have a perl script that FTPs a file down from another server, lately that > file has been corrupt or missing entirely. What I need to do is check the > file and see if it is greater then X number of bytes, if it is then it needs > to use it, if not it needs to delete the file and use the previous days > file, and email me to tell me it had a bad data set for today. > > I am not sure HOW to do the file size check. >
Do you want to do the file check locally or remotely? If local, perldoc -f stat (field 7) If remotely, Net::FTP provides the 'size' method. You definitely want to use Net::FTP for the FTP handling. > I am pretty sure I can just do a system call to sendmail to shoot me the > message. > Bad idea, use a mail handling module instead, there are many to choose from on CPAN. HTH, http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>