Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: find the latest created file in a directory

by Tux (Canon)
on Apr 24, 2013 at 13:57 UTC ( [id://1030410]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    opendir my $dh, $DIR or die "Error opening $DIR: $!";
    my @files = sort { $b->[10] <=> $a->[10] }
    ...
    closedir $dh;
    
    my ($name, @stat) = @{$files[0]};
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (6)
As of 2024-04-20 00:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found