Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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


Comment on Re: Getting latest file from FTP server
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://199208]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (12)
As of 2015-07-29 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (269 votes), past polls