#get the modification time of the remote file #assuming $ftp is a Net::FTP object my $mtime = $ftp->mdtm($file); #download the file $ftp->get($file); #set the time of the local file # (assumes $file is also the local file name) utime $mtime, $mtime, $file; #### my $now = time; utime $now, $now, @localfiles;