From erik at uhacc.org Mon Aug 9 11:14:19 2004 From: erik at uhacc.org (Erik Costlow) Date: Mon Aug 9 11:14:03 2004 Subject: [Bloomington-normal-pm] Net::SFTP Message-ID: <65384.68.20.180.248.1092068059.squirrel@uhacc.org> I am writing a script to transfer backups from a remote server using the Net::SFTP module. http://search.cpan.org/~drolsky/Net-SFTP-0.08/lib/Net/SFTP.pm I'm a bit confused as to how the do_open function works in returning its value. The following code always dies (the directory does exist). opendir(MAINDIR, $sftp->do_open("/mount")) or die... -Erik Pseudo-code of the final project (in case it helps anyone get a better understanding of the question) Log in to backup server cd to /mount/ #not /mnt for each folder next if the name doesn't begin with d cd to $folder/backup for each folder2 cd to $folder2/data for each file loop through, find the highest modification time Print the name and download the file loop loop loop -- Costlow Corporation http://www.costlowcorp.com