I need to retrieve files from a directory on a remote server that are at least 5 minutes old.
I am using Net::SFTP::Foreign in my Perl script.
The array @directory_info contains the directory path and the filemask. I am pulling the files from the remote server using $sftp->glob. How can I only get the files that are at least 5 minutes old using $sftp->glob? The $sftp->glob portion from my script is below.
while($i < 11)
$directory = "$directory_info[$i]";
$filemask = "$directory_info[$i]";
$sftp->setcwd($directory) or $newerr=1;
@list = $sftp->glob("$filemask") or $newerr=1;
Thank you for your time and help!