Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Beginners guide to Net::FTP

by runrig (Abbot)
on Aug 14, 2002 at 17:16 UTC ( #190164=note: print w/replies, xml ) Need Help??


in reply to Beginners guide to Net::FTP

Its good that you check the status of the FTP calls, but if they do fail, you may want to include the specific error message (which many mistakenly believe is in $! but is not). On the Net::FTP->new() call, the error message is in $@, and after you have a valid Net::FTP object (e.g. $ftp), you can call $ftp->message.

Another common mistake is to wrap the $ftp->message in quotes, e.g. $ftp->login('user','passwd') or die "Couldn't login: $ftp->message". If you do that, you'll get a very unhelpful error message :-)

Replies are listed 'Best First'.
Re^2: Beginners guide to Net::FTP
by Aristotle (Chancellor) on Aug 14, 2002 at 21:43 UTC
    Which can always be remdied by some further wrapping. :-) $ftp->login('user','passwd') or die "Couldn't login: @{[ $ftp->message ]}";
    ____________
    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://190164]
help
Chatterbox?
[1nickt]: stevieb it turns out that Dell still has the Precision line of "mobile workstations", just not displayed on their main website. I found the Precision 7710 with 4k display/full-size keybd as req'd.

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (12)
As of 2017-03-27 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.