in reply to Re^2: Net::Ftp Issue
in thread Net::Ftp Issue

Have you tried repeating the sequence of ftp commands interactively? (You can always ls to confirm the existence of the file.)

Perhaps you could do a ftp->dir();, to see if the file shows up in the directory listing?

For that matter, you could manually do a ls -b on the directory in question. Perhaps there's a non-printable character in the name of the file you're interested in.

Replies are listed 'Best First'.
Re^4: Net::Ftp Issue
by joepepsi18 (Novice) on Feb 04, 2008 at 21:46 UTC
    Thanks apl, but how do I print out the results of ftp->ls?

    I tried:
    my $result = $ftp->ls;
    print $result;

    But it does not return a value.
Re^4: Net::Ftp Issue
by joepepsi18 (Novice) on Feb 04, 2008 at 22:00 UTC
    Hello apl, I believe my last post didn't go through. My apologies.
    But can you let me know how I can print out the results of $ftp->ls or $ftp->dir?
    I tried to apply the results into a scalar, but it didn't print out anything
    my $result = $ftp->ls;
    print $result;
    Thanks!
      $ftp->ls() returns an array or array reference depending on context. You should be getting an array reference they way you're calling it (and something like "ARRAY(0x401fa298)" the way you're printing it). If that's the problem then you can print "$_\n" for $ftp->ls(). If you're really getting nothing, then you have a different problem.