in reply to FTP pattern matching and email notify

First, you need to have "use warnings;" and "use strict;" on all your programs. This will save you a lot of grief.

Before you do somthink like $cftp->mdtm($filename) you have to actually have a filename. E.g.

for my $filename ($ftp->ls) { my $filetime = $ftp->mdtm($filename) or die "mdtm failed ", $ftp->message; # here check if filetime is in your range }