Try this:
#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;
Regards,
Rhet
Update: I think I may have misunderstood your question. If you are wanting to change the time on the remote files (e.g. you are using Net::FTP to upload them to remote servers) then I'm not sure how to do it. However, one solution (kludge) could be to upload the files to the remote machines then change the time on all the local files to the current time:
my $now = time;
utime $now, $now, @localfiles;
Update #2: Another solution (also a kludge but it would work) would be to keep a logfile for each machine with the filenames and times. Then you could just parse the logfile and compare to your local files to see what needs to be uploaded.