<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
Noam Rathaus wrote:
<blockquote
cite="mid:6a2b811d0910241305q30d48639t461846dbf833f4fa@mail.gmail.com"
type="cite">
<pre wrap="">Shachar,
{ } in Perl are casting when they surround a value
And the second set of { } around the 'a' mean variable of Hash
</pre>
</blockquote>
Grumble grumble grumble....<br>
<br>
Okay, I'm sorry for being difficult. I really couldn't find the answer
in the Perl documentation.<br>
<br>
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.<br>
<br>
Thanks,<br>
Shachar<br>
<blockquote
cite="mid:6a2b811d0910241305q30d48639t461846dbf833f4fa@mail.gmail.com"
type="cite"><br>
<blockquote type="cite">
<pre wrap="">foreach my $elem (@{$ref->{a}})
</pre>
</blockquote>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
<a class="moz-txt-link-freetext" href="http://www.lingnu.com">http://www.lingnu.com</a>
</pre>
</body>
</html>