in reply to Net::FTP Woes

What's printed? dir returns a reference to an array in scalar context. Try this:

my @lines = $ftp->dir('\\'); print join("\n", @lines), "\n";

I might add that even on Windows FTP servers I've always used forward slashes as directory separators when in FTP. Show us your resulting output if this still fails.

Replies are listed 'Best First'.
Re: Re: Net::FTP Woes
by chaoticset (Chaplain) on Feb 03, 2003 at 23:22 UTC
    Gladly. The output was
    C:\WINDOWS\Profiles\Gregory\Desktop\LLPSV>perl rpasafe.pl C:\WINDOWS\Profiles\Gregory\Desktop\LLPSV>
    This took a minute or so.
    Here's the whole of the script I just ran (it's the pertinent bits from the rest of the script, separated to determine the problem)
    #/usr/bin/perl -w use strict; use warnings; ########################################################### # # rpasafe.pl -- robot propagator attempt # ########################################################### use Net::FTP; my $host = 'ftp.ftpserver.com'; my $u = 'user'; my $p = 'pass'; my $ftp; unless ($ftp = Net::FTP->new($host)) { die "No FTP for you!\n\n"; } $ftp->login($u, $p); $ftp->binary; my @lines = $ftp->dir('//'); print join("\n", @lines), "\n";


    -----------------------
    You are what you think.