Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Cannot open local file error while

by Khen1950fx (Canon)
on May 26, 2011 at 04:23 UTC ( #906748=note: print w/replies, xml ) Need Help??

in reply to Cannot open local file error while

First, get in the habit of posting a workable snippet. You'll get a better response that way. Second, avoid useless use of interpolation such as  $ftp->put("$file"). Try something like this:
!/usr/bin/perl use strict; use warnings; use Net::FTP; use constant HOST => ''; use constant DIR => '/mnt/lib'; use constant FILES => 'libs'; my $ftp = Net::FTP->new( HOST, Debug => 1, Passive => 1, Timeout => 1 ); $ftp->login('anonymous'); $ftp->cwd(DIR); $ftp->binary; foreach my $file(FILES) { $ftp->put($file) or die "$@\n"; } $ftp->quit;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://906748]
[Eily]: hey, I'm just behind Larry in SioB \o/
[Corion]: Eily: Wheee ;)
[Eily]: I'll add that to my résumé

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2018-01-22 11:10 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (233 votes). Check out past polls.