my @names = qw[ the quick brown fox ]; undef %h; for my $alias ( @names ){ $h{ $alias } = sub { print $alias; $alias = 'fred'; ####### Mysterious action at a distance here }; }; pp \%h; { brown => sub { "???" }, fox => sub { "???" }, quick => sub { "???" }, the => sub { "???" }, } for my $key ( keys %h ) { $h{ $key }->(); };; the fox brown quick print @names;; fred fred fred fred