in reply to subroutine redefined error when switching scripts

The other posters are right and their solutions are better ways to accomplish what you intend to do.

In the spirit of explaining how to do what you're asking literally, though, you can disable (or unimport) a pragma conditionally, after it's been used or required, with this idiom:

warnings->unimport() if $nodebug;

You'll probably have to pass the argument redefine, but again, the other posters give better alternatives to this approach.