confusing question about GLOB

2006-03-27 Thread Jeff Pang
hello,list, See these commands pls: [EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); print $::{test}' *main::test [EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); print ${*main::test{HASH}}{type}' software [EMAIL PROTECTED] core

Re: confusing question about GLOB

2006-03-28 Thread John W. Krahn
Jeff Pang wrote: > hello,list, Hello, > See these commands pls: > > [EMAIL PROTECTED] coremail]$ perl -le 'our %test = (type => "software"); > print $::{test}' > *main::test You are printing the value for the key 'test' in the hash %:: (the symbol table; see the "Symbol Tables"

Re: confusing question about GLOB

2006-03-28 Thread Jeff Pang
>> [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

Re: confusing question about GLOB

2006-03-28 Thread John W. Krahn
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?