# You never, ever want to call this. sub perl_unused_by_me { # You have to make sure your scope is correct here. $main::variable = 0; # You might also consider something like # undef $main::variable; # so that if this gets called by accident then your # code will produce an error at that point, not # silently use the bad data. }