> -----Original Message-----
> From: Jerry Preston [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, July 27, 2001 1:09 PM
> To: begginners
> Subject: in over my head in hashes again
> 
> 
> Hi!
> 
> I am lost again:
> 
> 
> 
>   %T_QUESTION = {

(snip remainder)

The construct

   %foo = { blah ... };

is wrong. a list inside curly braces { } evaluates to a *reference* to an
anoynmous hash. You need to enclose your list in parens ( ) to initialize a
hash. You either need to use:

   $foo = { bar => 'baz' };
   print $foo->{bar};   # note deref; prints "baz"

or

   %foo = ( bar => 'baz' );
   print $foo{bar};     # prints "baz"

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to