J
Josef Moellers
Hi,
I have this problem:
I'd like to access a directory named ' ' (a single blank) on an ftp server.
I can connect all right, but the $ftp->cwd(' '), while succeeding, only
moves me to /, rather than into the directory.
I've also tried '" "' and '\ ' to no avail.
#!/usr/bin/perl
use Net::FTP;
my $host = 'X.Y.Z';
my $username = 'anonymous';
my $password = 'anonymous';
my $dir = ' ';
$ftp=Net::FTP->new($host,Timeout=>240) or die "Cannot connect";
print "Connected\n";
$ftp->login($username, $password) or die "Cannot login";
print "Logged in\n";
$ftp->cwd($dir) or die "Cannot chdir to blank";
print "Now in ", $ftp->pwd, "\n";
my @files = $ftp->ls or die "Cannot get file list";
foreach (@files) {
print ">$_<\n";
}
$ftp->quit;
I have this problem:
I'd like to access a directory named ' ' (a single blank) on an ftp server.
I can connect all right, but the $ftp->cwd(' '), while succeeding, only
moves me to /, rather than into the directory.
I've also tried '" "' and '\ ' to no avail.
#!/usr/bin/perl
use Net::FTP;
my $host = 'X.Y.Z';
my $username = 'anonymous';
my $password = 'anonymous';
my $dir = ' ';
$ftp=Net::FTP->new($host,Timeout=>240) or die "Cannot connect";
print "Connected\n";
$ftp->login($username, $password) or die "Cannot login";
print "Logged in\n";
$ftp->cwd($dir) or die "Cannot chdir to blank";
print "Now in ", $ftp->pwd, "\n";
my @files = $ftp->ls or die "Cannot get file list";
foreach (@files) {
print ">$_<\n";
}
$ftp->quit;