in reply to How do I pass refs to tied vars ?
As you can see your problem is that you're testing the lexical %b and not the package %b.use strict; use Tie::Hash; my(%a, %b); tie %a, 'Tie::StdHash'; print( (tied(%a) ? 'tied' : 'NOT tied'), " my %a\n"); *b = \%a; print( (tied(%main::b) ? 'tied' : 'NOT tied'), " %main::b\n"); print( (tied(%b) ? 'tied' : 'NOT tied'), " my %b\n"); __output__ tied my %a tied %main::b NOT tied my %b
_________
broquaint
|
|---|