my @type = ('farm\ &\ ranch', 'land', 'residential'); my $server = 'not.the.real.server.net'; my $c = Net::FTP->new($server); $c->login('username', 'password') or die "couldn't log in: $!\n"; for my $i (0..2) { $c->get("listings-$type[$i].txt.gz"); for my $j (0..6) { my $k = timestamp($j); $c->get("pics-$type[$i]-$k.tar"); } } $c->quit(); exit; sub timestamp() { my $days = shift @_; my @today = localtime(time - (86400 * $days)); $today[4]++; $today[5] += 1900; return sprintf("%04d%02d%02d", @today[5,4,3]); }
I'm sure that this could be written more tightly. I'm far more interested in 'working' than 'tight' right now, since this needs to be working before I leave for a week this evening.
I have verified that I am connected to the server, am logged in correctly, and can download the other files that don't have spaces in them. Someone's got to know... please help.
In reply to Net::FTP and filenames with spaces by amelinda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |