http://qs321.pair.com?node_id=596376

greatdane has asked for the wisdom of the Perl Monks concerning the following question:

I have a ton of debug calls in my code like the following.
&foo_debug ("<message>") if ($FOO_DEBUG_MODE);
I am always qualifying the calls with an "if" to avoid the cost of a call/return pair. Is there anything else I can do to eliminate more of the performance overhead? A better method? BTW, I want the debug calls to be an execution time option. The program has a usage with a "-debug" option. Thanks!