Yeah, well it took me forever to figure out how to capture Perl's builtin warnings. It is quite difficult. I had to resort to capturing a fatal error message (I was using a different method, but it didn't work -- trying to get the "Useless use of variable in void context" message, but couldn't figure out HOW).
Then it occurred to me -- how about I see if there's an error message that contains all the letters I need, and indeed there are several. (This is a sign that Larry played Zero-Wing.)
And it irks me that Perl has changed the error handling/catching method in 5.6.0. Oh well.
Perl and Regex Hacker