Depending on what you're doing, Log::Log4perl provides an easy way to manage the 'print' style of debugging particularly in bigger applications:
- provides various logging levels (Debug, Info, Error, Warning, and Fatal)
- controlled from configuration files (easy to have debugging on development box, only errors on production box, for example)
- configurable by sections of your application (e.g., web application in one log file at one level, cron scripts in another at a different log level)
- configurable by class - easy to quieten noisy modules, or add detailed debugging to somewhere deep within an application