{ #anonymous block to establish a limited lexical scope no strict 'refs'; # yes yes its evil, but i have no choice for my $sub (qw(foo bar baz)) { *$sub =sub { #insert a new subroutine into the appropriate glob using symrefs # ... }; } # All done with our symrefs now, normality has returned. }