develooper Front page | perl.beginners | Postings from February 2002

time setting for local and remote files

Thread Next
From:
Student of Perl
Date:
February 12, 2002 09:03
Subject:
time setting for local and remote files
Message ID:
20020212170407.24347.qmail@mailFA3.rediffmail.com

use Net::FTP;

use constant HOST=>'ftp.somexample.com';
$ftp=Net::FTP->new(HOST) or die "connection error";
$ftp->login('anonymous') or die $ftp->message;
$ftp->binary or die $ftp->message;
$ftp->get("sample.txt") or die $ftp->message;
$ftp->quit();

I have the above script created.The site and file names
I have taken as an arbitrary examples. Basically I have
2 questions.

How do I get date and time of the remote ftp file?

How do I get date and time of local file? (This is not
related with the above code directly ; basically
I want to compare date and time of local and remote
files)

And how to set date and time for local file? I would 
like to set any date for a local file.

Can you please show me using small script examples?

Thanks
-Jim 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About