Re: A Strange Syntax

2005-12-06 Thread Jennifer Garner
Thanks for Adriano Ferreira.Your explaination is good for me.I have known that. On 12/7/05, Adriano Ferreira <[EMAIL PROTECTED]> wrote: > > On 12/5/05, Jennifer Garner <[EMAIL PROTECTED]> wrote: > > As we know, $::{sym} == *main::sym, it's a typeglob. > > but what is **main::sym? and the same,what

Re: A Strange Syntax

2005-12-06 Thread Adriano Ferreira
On 12/5/05, Jennifer Garner <[EMAIL PROTECTED]> wrote: > As we know, $::{sym} == *main::sym, it's a typeglob. > but what is **main::sym? and the same,what is *{$glob}?thanks. **main::sym is a syntax error, but *{*main::sym}==*main::sym. But don't be fooled by the equality $::{sym} == *main::sym.

Re: A Strange Syntax

2005-12-05 Thread Jennifer Garner
${*{$::{sym}}{HASH}}{name}; As we know, $::{sym} == *main::sym, it's a typeglob. but what is **main::sym? and the same,what is *{$glob}?thanks. On 12/6/05, Flemming Greve Skovengaard <[EMAIL PROTECTED]> wrote: > > Wiggins d'Anconia wrote: > > > > Now that you understand it, replace it with $sym-

Re: A Strange Syntax

2005-12-05 Thread Flemming Greve Skovengaard
Wiggins d'Anconia wrote: Now that you understand it, replace it with $sym->{name} so the next person doesn't have to ask. Unless you are using a really old Perl. Actually that should be *sym->{name} instead of $sym->{name} ( or %sym->{name} but that's deprecated ). Else you get "Variable "$sy

Re: A Strange Syntax

2005-12-05 Thread Wiggins d'Anconia
Adriano Ferreira wrote: > On 12/5/05, Jennifer Garner <[EMAIL PROTECTED]> wrote: > >>print ${*{$::{sym}}{HASH}}{name}; > > >>How to analyse the last sentence of that code?Thanks. > > >>From "perldoc perlref" > >7. A reference can be created by using a special syntax, lovingly >

Re: A Strange Syntax

2005-12-05 Thread Adriano Ferreira
On 12/5/05, Jennifer Garner <[EMAIL PROTECTED]> wrote: > print ${*{$::{sym}}{HASH}}{name}; > How to analyse the last sentence of that code?Thanks. >From "perldoc perlref" 7. A reference can be created by using a special syntax, lovingly known as the *foo{THING} syntax. *foo{T

A Strange Syntax

2005-12-05 Thread Jennifer Garner
Hi,lists, Seeing this code please: our %sym = ( name => 'flower', age => 23, ); print ${*{$::{sym}}{HASH}}{name}; The result of printing is : flower. How to analyse the last sentence of that code?Thanks.