Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^4: Net::FTP

by stevieb (Canon)
on Jun 09, 2016 at 12:36 UTC ( [id://1165222]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Net::FTP
in thread Net::FTP

Untested:

my $logged_in = eval { $ftp->login($un, $pw); 1; }; if (! $logged_in){ if ($@ =~ /login incorrect/i){ # do stuff, perhaps keep asking user for un/pw and # re-attempt login in a loop } else { # might not be a login error... # handle different exception } }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2024-03-28 12:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found