Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Using Net::FTP need to get latest file from the directory ?

by Lawliet (Curate)
on Mar 10, 2009 at 22:19 UTC ( #749750=note: print w/replies, xml ) Need Help??

in reply to Using Net::FTP need to get latest file from the directory ?

Huh? Are you asking if there are methods like ls([ DIR ]) and dir([ DIR]) (both found in the documentation for Net::FTP). Or are you asking if there is a method that specifically gets the "latest" file? If the latter option, the question "what do you mean by latest?" comes to mind. Assuming you mean file that was most recently changed, you can use mdtm( FILE ) to find the modification time for the file in question.

That being said, care to elaborate? Will regular Perl file checks not work?

And you didn't even know bears could type.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://749750]
[Eily]: oh, boolean context uses the "" overload if no bool overload has been defined
[Eily]: (I wondered if overloading bool was actually necessary)
[Corion]: Yeah, you need bool to get a true value, and the rest to return the other value ;)
[choroba]: perl -wE '{package o; use Tie::Scalar; use parent -norequire => "Tie::StdScalar" ;sub FETCH { "x" x int rand 2}} tie my $x, "o" ; say $x for 1 .. 10'
[choroba]: for complete ness

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-07-27 13:48 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (414 votes). Check out past polls.