warn#

Synopsis#

warn "something looks wrong";
warn "problem at $file line $line\n";
warn $object;

Description#

Issues a warning message to STDERR without terminating the program.

Prints the argument to STDERR. If the string does not end with a newline, Perl appends at FILE line LINE.

If $SIG{__WARN__} is set to a code reference, that handler is called with the warning message as its sole argument instead of printing to STDERR. The handler runs in void context and its return value is discarded.

See also#

die, Carp