use Fcntl; use SDBM_File; tie(%h,'SDBM_File','foodbm',O_RDWR|O_CREAT,0640) || die $!; $h{'a'}=1; %h{'b'}=[2,3]; if (ref $h{'b'}) { print "it's a ref,ok\n"; # perl will not print this! } else { print "it's not a ref,just $h{'b'}\n"; # this is what perl printed! } if (!defined $h{'b'}->[0]) { print "\$h{'b'}->[0] not defined!\n"; # perl also print this! } untie(%h);