in reply to "canned" FTP

Ok, so I RTFM and came up with using ls rather than list.
#!/usr/bin/perl -w use strict; use Net::FTP; use Data::Dumper; my $FTPdHandle; my @FTPdDir; $FTPdHandle = Net::FTP->new('ftp.funet.fi', Debug=>1); $FTPdHandle->login("ftp","mypassword\@com.com"); $FTPdHandle->cwd("/pub"); @FTPdDir = $FTPdHandle->ls(); print Dumper(@FTPdDir); $FTPdHandle->quit;
Which In turn produced the output:
$VAR1 = 'CPAN'; $VAR2 = 'FreeBSD'; $VAR3 = 'Linux'; $VAR4 = 'NeXT'; $VAR5 = 'NetBSD'; $VAR6 = 'OS'; $VAR7 = 'README'; $VAR8 = 'TeX'; $VAR9 = 'X11'; $VAR10 = 'amiga'; $VAR11 = 'archive'; $VAR12 = 'astro'; $VAR13 = 'atari'; $VAR14 = 'cae'; .. .. <snip>
Which reconciled perfectly with me doing it manually via the cmd line.

Can I suggest using Data::Dumper to dump the contents of data structures rather than straight print? It will explicitily let you know if a value is undef, and if not it will recurse its way thru' any complex structures you many have. It also is very handy when you have the dereferencing blues to reverse engineer what you have already written (not that you'll ever need to reverse engineer what you've already written.. :-) )