start page | rating of books | rating of authors | reviews | copyrights

Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: wantarray Chapter 5
Function Reference
Next: Reference: write
 

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 with die , a message not ending with a newline will have file and line number information automatically appended. The warn operator is unrelated to the -w switch.


Previous: Reference: wantarray Perl in a Nutshell Next: Reference: write
Reference: wantarray Book Index Reference: write