I am using SFTP through the NET::SSH2 package in Perl.
Listing files in a folder works good using the opendir function.
I would like to have the files in time order with the latest modified file last.
Is that possible and how?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The hashes returned by
Net::SSH2::Dir::readmethod have and entry calledmtimewhich indicates the time the entry was modified. Use it to sort the entries: