The file does not copy into my Temp folder on my c: drive. Possible answers? Thanks#!/usr/local/bin/perl -w use Net::FTP; use Sys::Hostname; $hostname = hostname(); $hostname = '*****.com'; # ftp host $username = '*******'; # username $password = '*******'; # password $home = '/doytest/cgi-bin/Data/*.txt'; $ftp = Net::FTP->new($hostname); # Net::FTP constr +uctor $ftp->login($username, $password); # log in w/userna +me and password $pwd = $ftp->pwd; # get current dir +ectory open my $filehandle, '>', 'c:/Temp/00000001.610' or die "Couldn't open output file.\n$!"; $ftp->get("00000001.txt", $filehandle); close $filehandle or die "Couldn't close output file.\n$!"; # Now, output HTML page. print <<HTML; Content-type: text/html <HTML> <HEAD> <TITLE>Download Files</TITLE> </HEAD> <BODY> <B>Current working directory:</B> $pwd<BR> Files to download: <P> HTML @entries = $ftp->ls($home); # slurp all entr +ies into an array print "@entries \n\n"; print "$filehandle\n"; print <<HTML; </BODY> </HTML> HTML $ftp->quit;
In reply to Re^4: How Do I Use Net::FTP
by Anonymous Monk
in thread How Do I Use Net::FTP
by Doyle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |