Jeff Pang wrote: >>>[EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); >>>print ${$::{test}{HASH}}{type}' >>>[ no output ] >>You are trying to print $::{test}->{HASH}->{type} but $::{test} does not >>contain a hash reference. > > Thanks John.Then why can this work? > > $ perl -le 'our %test = (type => "software");print > ${*{$::{test}}{HASH}}{type}' > software > > I saw that someone other on this list had written this statement,but It's > hard to understand for that.
$ perl -le'our %test = (type => "software"); print $::{ test };' *main::test $ perl -le'our %test = (type => "software"); print for *{ $main::{ test } }{ HASH }, *{ *main::test }{ HASH }, \%main::test;' HASH(0x8187774) HASH(0x8187774) HASH(0x8187774) $ perl -le'our %test = (type => "software"); print for ${ *{ $::{ test } }{ HASH } }{ type }, ${ *{ *::test }{ HASH } }{ type }, ${ { %test } }{ type }, ${ \%test }{ type }, ${ test }{ type }, $ test { type };' software software software software software software John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>