sub new_glob { return local *X } my %h = qw{a 1 b 2}; my $glob = new_glob(); # Create glob *$glob = \%h; # Initialise glob print %$glob, "\n"; # Access hash referenced by glob