I assume you're using
Net::FTP, and if you're not you should be.
You can use the
dir method to get a listing of files and directories, you can then iterate over that list and execute the
mdtm( $file ) method on each file, which will give you the modification date.
The rest is left as an exercise for the reader.
--Dave