in reply to Pass By Reference Inner Workings - Magic scalar operator

If you wanted to use a hash variable as an alias to the original hash, it would go like this:
use strict; use warnings; my %foo = ( a => 1, b => 2, c => 3 ); mysub(\%foo); sub mysub { our (%x); local *x = shift; foreach ( sort keys %x ) { print "$_ -> $x{$_}\n"; } }

Caution: Contents may have been coded under pressure.