Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Getting latest file from FTP server

by krujos (Curate)
on Sep 19, 2002 at 15:52 UTC ( #199208=note: print w/replies, xml ) Need Help??


in reply to Getting latest file from FTP server

You could use ls -lrt (which reverses the list by time updated). Something like
$tmp = `ls -lrt`; @array = split /\n/,$tmp; print $array[@array-1];
you could do this cleaner with a regexp even.
Good Luck
Josh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://199208]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2017-04-23 11:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (430 votes). Check out past polls.