package blarg; use strict; use warnings; sub hrmph { our $global = "blarg"; print "$global\n"; local $global; $global = "hrm, just in here!"; print "$global\n"; # when this scope is done, global goes back to "blarg" automatically }