A quick glance at the source shows that MJD is using the global $TRACE to decide if the trace output should be printed. Just set $TRACE = 0 at the top of your program, set it to a non-zero value when trace should start, and back to zero again when you want it off again.