Hi! I'd like to delete a file and us "or warn" to write a warning message to a log file for any warnings that are incountered. If there are no warnings and the file is deleted successfully, then I'd like to print a "successfully deleted" message to a log file. The code below will print the "successfully deleted" message everytime, how can I code it so that it only prints the "successfully deleted" message to the log file when there are no warnings? Thank you to any who can help me out.
$ftp->delete($file) or warn print LOG "Cannot delete $file - ", $ftp- +>message; print LOG "$file successfully deleted\n";
In reply to or warn question by TCM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |