our $bob; local $bob; $bob = 'bob'; #### use strict; use warnings; package MyModule; sub do_it { my ($arg) = @_; our $VERBOSE; ... warn(...) if $VERBOSE; ... } sub do_it_quietly { my ($arg) = @_; our $VERBOSE; # Avoid saying $MyModule::VERBOSE local $VERBOSE; # Save existing value. $VERBOSE = 0; # Disable logging. do_it($arg); } 1;