use strict; use Tie::Hash::Stack; my (%a, %b); tie %a, 'Tie::Hash::Stack'; print( (tied(%a) ? 'tied' : 'NOT tied'), " a\n"); *b = \%a; print( (tied(%b) ? 'tied' : 'NOT tied'), " b\n");