Shachar,

{ } in Perl are casting when they surround a value
And the second set of { } around the 'a' mean variable of Hash


2009/10/24 Shachar Shemesh <shac...@shemesh.biz>:
> Dov Grobgeld wrote:
>
> Noam beat me to it, but here's perl solution without additional variables:
>
> #!/usr/bin/perl
>
> %hash = (a=>['moo','goo','woo'],
>          foo=>3,
>          baz=>5);
>
> $ref = \%hash;
> foreach my $elem (@{$ref->{a}})
>
> Hi Dov,
>
> Yes, it works. Now can you, please, explain to me why? What is the role of
> each bracket you used (and its location)?
>
> Shachar
>
> --
> 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
>
>

_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il

Reply via email to