Okay, this won't be the most exciting entry in the world. There are several different ways of logging or recording errors and warnings in perl, and I find I easily get confused. So this entry will serve as a very, very basic reference for me. Other people may find it useful. Or not.
Taken from the Perl 5.10.0 documentation:
Outside an eval, prints the value of LIST to STDERR and exits with the current value of $! (errno). If $! is 0 , exits with the value of ($?>> 8) (backtick
commandstatus). If ($?>> 8) is 0, exits with 255. Inside an eval(), the error message is stuffed into $@ and the eval is terminated with the undefined value. This makes die the way to raise an exception.