Net::FTP: cwd(' ')
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 08 Jun 2005 10:36:23 +0200
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;-- Josef Möllers (Pinguinpfleger bei FSC) If failure had no penalty success would not be a prize -- T. Pratchett
.
- Follow-Ups:
- Re: Net::FTP: cwd(' ')
- From: Sisyphus
- Re: Net::FTP: cwd(' ')
- From: Damian James
- Re: Net::FTP: cwd(' ')
- Prev by Date: Re: Tk::FileSelect hangs on W98 root directory
- Next by Date: Re: symbol table question
- Previous by thread: Write Excel problem
- Next by thread: Re: Net::FTP: cwd(' ')
- Index(es):
Relevant Pages
|