my @d = $ftp->ls(); for (@d) { my $mdtm = strftime("%Y/%m/%d %H:%M:%S", localtime($ftp->mdtm($_))); print "filename = $_\nmdtm = $mdtm\n"; # check file is newer than whatever criteria you have if ($mdtm ge "whatever") { $ftp->get($_); } }