in reply to DEBUG levels <perl formats>
I would highly recommend Log::Log4perl
You would have to translate your commandline switches into a constructor for a logger instance.
Hazah! I'm quitting!