Since you want to log a message regardless, with only the content of the message determined conditionally, the ternary seems ideal suited:
print LOG $ftp->delete($file) ? "$file successfully deleted\n" : "Cannot delete $file - " . $ftp->message;
In reply to Re: or warn question
by BrowserUk
in thread or warn question
by TCM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |