passing parameters to Net::FTP

M

mike

hi
i create a subroutine


sub ftpget {
$filetype = $_[0]
my $ftp = Net::FTP->new("$FTPSERVER");
$ftp->login("$FTPUSER" , "$FTPPASS");
$ftp->cwd("/path");
@listing = $ftp->dir("$filetype") ;
$ftp->quit;
return @listing;
} #end sub


my @list = ftpget("text*") ;
print @list;


I want to get a listing of all files begining with "text" but the
results show otherwise. What is wrong?
thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ls in ftp fails 5
Net::FTP: cwd(' ') 5
Net::FTP 5
Net::FTP::Recursive hangs 3
Net::FTP Wierdness; or Not..... 2
Net::FTP - Binary mode 5
Net::FTP and IBM TSO :-( 15
Perl FTP Get Help 3

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,602
Members
45,184
Latest member
ZNOChrista

Latest Threads

Top