Noam Rathaus wrote:
Shachar,
{ } in Perl are casting when they surround a value
And the second set of { } around the 'a' mean variable of Hash
Grumble grumble grumble....
Okay, I'm sorry for being difficult. I really couldn't find the answer
in the Perl documentation.
I understand the second set of curly braces. I also, somewhat,
understand that the -> replaces the % (i.e. - reference dereferencing).
What I'm not so clear is what the first set of curly braces do (what do
you mean by "casting" - casting to what? How is that decided?). I'm also
not clear on why the surrounding round brackets are needed. I understand
they are so this will be a list context, but I don't understand why it's
needed once I put a @ to dereference the array.
Thanks,
Shachar
foreach my $elem (@{$ref->{a}})
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il