<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body dir="ltr" bgcolor="#ffffff" text="#000000">
Dov Grobgeld wrote:
<blockquote
cite="mid:dc666480910241057k4724cb72ne8bfdc04ba576d33@mail.gmail.com"
type="cite">
<div dir="ltr">Noam beat me to it, but here's perl solution without
additional variables:<br>
<br>
<span style="font-family: courier new,monospace;">#!/usr/bin/perl</span><br
style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">%hash =
(a=>['moo','goo','woo'],</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> foo=>3,</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> baz=>5</span><span
style="font-family: courier new,monospace;">);</span><br
style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">$ref = \%hash;</span><br
style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">foreach my $elem
(@{$ref->{a}})</span><br style="font-family: courier new,monospace;">
</div>
</blockquote>
Hi Dov,<br>
<br>
Yes, it works. Now can you, please, explain to me why? What is the role
of each bracket you used (and its location)?<br>
<br>
Shachar<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>