On Tue, Mar 18, 2008 at 9:46 AM, Jay Hannah &lt;<a href="mailto:jhannah@omnihotels.com">jhannah@omnihotels.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br><div><font face="Courier New" size="2">reverse() is neat. I didn&#39;t know/remember 
that Perl function.&nbsp; :)</font></div></div></blockquote><div><br>And for those of you wondering (like I was), here&#39;s what happens when you run it with multiple values on the right side of the =&gt; sign...<br><br><b>Code:</b><br>
use Data::Dumper;<br>use strict;<br>use warnings;<br>my %a2b = ( A=&gt;000, B=&gt;001, C=&gt;001, D=&gt;002 );<br>printf (&quot;Original:\n&quot;);<br>printf Dumper(\%a2b);<br><br>my %b2a = reverse %a2b;<br>printf (&quot;\n======================\nReversed:\n&quot;);<br>
printf Dumper(\%b2a);<br><br>printf (&quot;Done!\n&quot;);<br><br><br><b>Output:</b><br>Original:<br>$VAR1 = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;A&#39; =&gt; 0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;D&#39; =&gt; 2,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;C&#39; =&gt; 1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;B&#39; =&gt; 1<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br><br>======================<br>Reversed:<br>$VAR1 = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;1&#39; =&gt; &#39;C&#39;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;0&#39; =&gt; &#39;A&#39;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;2&#39; =&gt; &#39;D&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>Done!<br>
<br><b>RESULT:</b><br><u>&quot;There can be only one</u>&quot; (to be expected with a hash variable), but there aren&#39;t any warnings that appear when there are multiple values.&nbsp; I&#39;m not certain if it is &#39;last one wins&#39; (last being last one defined in original hash), or &#39;first one wins&#39; (first being the first as stored in memory and shown in the Dumper output)...<br>
<br>Dan<br>&nbsp;<br></div></div>-- <br>&quot;Quis custodiet ipsos custodes?&quot; (Who can watch the watchmen?) -- from the Satires of Juvenal<br>&quot;I do not fear computers, I fear the lack of them.&quot; -- Isaac Asimov (Author)<br>
** *** ***** ******* *********** *************