Testing that darned filehandle
It wasn't fun finding out that some legacy code creates a bunch of filehandles on the fly to do logging.
package Some::Client;
use Some::Logging::Module;
# later ...
print MAGICLOGHANDLE $some_data;
That MAGICLOGHANDLE is dynamically generated and shoved into my namespace (along with a ton of other handles, one per log). So I needed to test what was being printed to it. Fortunately, Perl's dynamism makes this really, really easy.