
perl_issue
New User
Jul 1, 2011, 6:45 AM
Post #3 of 5
(712 views)
|
Am using to sftp->do_setstat function to get the system time as timestamp of the ftp'ed file. But it is not working fine for me. Let me know if there any suggestions. my %args = (ssh_args => { identity_files => [ "$ENV{HOME}/.ssh/id_rsa"]} ); my $VAR1 = bless( { 'mtime' => 1203350526, }, 'Net::SFTP::Attributes' ); my $attrs = Net::SFTP::Attributes->new(Stat => [ stat "$file" ]); $ftp = Net::SFTP->new($machine, %args); $ftp->put($file,$file); $ftp->do_setstat($file, $attrs);
|