Ricardo SIGNES wrote:

* Bill Gradwohl <[EMAIL PROTECTED]> [2006-01-11T09:08:15]

while ( ($k,$v) = each %father ) {
   push( @{ $children{$v} }, $k );
}

It's the push line I'm having difficulty with. Here's what I understand:

The outermost {} can be removed to simplify it to : push( @$children{$v}, $k);


You understand incorrectly.

If it was  @{ $foo } you could simplify to @$foo, but you cannot
simplify what you see to what you said.


Good point! Thats why, IMHO, you should always code in a way that no one (including you in 6 months) ever has to ask "whats in the world is being smoked right there' :)

@{ $foo }
@{ $bar{$_} }
@{ $bax->{'tmbg'}[8] }

You always know that whatever is in @{} is supposed to be an array ref ;)

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to