Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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;

Comment on Re: Cannot open local file error while
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://906748]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (9)
As of 2014-12-27 02:34 GMT
Find Nodes?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?

    Results (176 votes), past polls