Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: or warn question

by sauoq (Abbot)
on Jun 08, 2012 at 18:47 UTC ( #975219=note: print w/ replies, xml ) Need Help??


in reply to or warn question

The do_something or warn_or_die($message); idiom is a good one. But there's no requirement that you use it when it doesn't fit well. Just do the obvious...

if ($ftp->delete($file)) { print LOG "$file successfully deleted\n"; } else { print LOG "Cannot delete $file - ", $ftp->message; }

-sauoq
"My two cents aren't worth a dime.";


Comment on Re: or warn question
Select or Download Code
Re^2: or warn question
by TCM (Acolyte) on Jun 08, 2012 at 19:29 UTC
    This one worked like a charm too. Thank you for taking the time to reply!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2015-07-07 08:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls