use strict; $MyClass::foo = 'boink'; sub bar { no strict; # strict turned off for this sub } ... # strict again in effect