warn
warn msg
- Produces a message on STDERR just like
die, but doesn't try to exit or throw an exception. For example:
warn "Debug enabled" if $debug;
If the message supplied is null, the message "Something's wrong"is used. As withdie, a message not ending with a newline will have file and line number information automatically appended. Thewarnoperator is unrelated to the -w switch.