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.
I just read a very clear tutorial on Perl scoping mechanisms:
I often get bitten by scoping issues but unfortunately (or fortunately?) it's usually easier in Perl to work around your problem than to understand the reasons behind it.
One part I found interesting was the section labelled "The Current Package" which explains the use of the package command in Perl. There is a tendency (or, at least, I have a tendency) to conflate the use of the Perl package command and, say, the use of the Java package declaration because they are often used to achieve the same effect, namely the separation of namespaces, and also because, by convention, they are used in a syntactically similar way. Because of this, it is easy to forget that the package command in Perl is just that: a command. You can call it from anywhere, multiple time from the same file even, and the effect is simply to change the current package - which in itself doesn't have a huge effect on how you write your code, just the way to access your variables.