in reply to Net::SFTP::Foreign setcwd to relative directory
#!/usr/bin/perl use strict; use warnings; use Cwd; use autodie qw( :all ); use Net::SFTP::Foreign; my $sftp = Net::SFTP::Foreign->new( 'sftp.foo.com', password => 'foo_foo', more => '-v', timeout => 0, autoflush => 1, autodisconnect => 2, ); chdir('/root/Desktop'); $sftp->setcwd('/root/Desktop'); print "===================\n", getcwd(), "\n", "Done!\n", "===================\n"; undef $sftp;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::SFTP::Foreign setcwd to relative directory
by salva (Canon) on Aug 28, 2011 at 14:45 UTC |