On Sat, Jul 09, 2011 at 05:24:01PM +0530, Narasimha Madineedi wrote:
> hi all,
> any net::ftp commands to get latest file from the directory.
> 

You have the hard work yourself:
1. Either use the $ftp->dir() function to get the timestamps, parse it
   and find out the latest. A bit  unreliable.
2. Better is to use $ftp->ls() to get the list of files, and for each
   file, use $ftp->mdtm() to get the modification time, and pick the
   latest. mdtm() doesn't work with directories apparently in my ftp
   server, so it is useful to skip entries when it doesn't return a
   value.

- Sandip


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


  • hiii Narasimha Madineedi

Reply via email to