#! perl -slw use strict; sub t{ ## Strict complient lexical access to a glob our %hash; ## Localise it for use as an alias ## to an inbound hash ref local *hash = shift; ## no need to dereference the hashref print "$_ => $hash{ $_ }" for keys %hash; } my %hash = ( 'A'..'Z' ); t( \%hash ); __END__ P:\test>test S => T A => B O => P W => X K => L Y => Z E => F Q => R M => N C => D I => J G => H U => V