<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div id="yui_3_16_0_1_1429536093456_2239" dir="ltr">Perl Folks,</div><div id="yui_3_16_0_1_1429536093456_2357" dir="ltr">Here's an interesting Perl-ism that bit me yesterday.  I've been starting to drop my sub "return" but I'm going back to being explicit as the performance hit has been fixed in later Perls and it just doesn't pay for itself in debugging.  Moral of the story: be explicit. I hope someone finds this helpful.</div><div id="yui_3_16_0_1_1429536093456_2511" dir="ltr">Mike</div><div id="yui_3_16_0_1_1429536093456_2510" dir="ltr"> </div><div id="yui_3_16_0_1_1429536093456_2509" dir="ltr"> </div><div id="yui_3_16_0_1_1429536093456_2586" dir="ltr"><font id="yui_3_16_0_1_1429536093456_2499" face="Courier New, courier, monaco, monospace, sans-serif">perl -e '<br>use strict;<br>use warnings;<br>use Data::Dumper qw{Dumper};<br>our @list=(a=>1, b=>2);<br>sub a {{a=>1, b=>2}};   #{} is anon hash ref<br>sub b {[@list]};        #{} is anon array ref<br>sub c <a id="yui_3_16_0_1_1429536093456_2587" href="mailto:%7B%7B@list">{{@list</a>}};        #{} is block returns list<br>sub d {return <a id="yui_3_16_0_1_1429536093456_2588" href="mailto:%7B@list">{@list</a>}}; #{} is anon hash ref</font></div><div id="yui_3_16_0_1_1429536093456_2580" dir="ltr"><font id="yui_3_16_0_1_1429536093456_2585" face="Courier New, courier, monaco, monospace, sans-serif">print Dumper({a=>a(), b=>b(), c=>c(), d=>d()});<br>'<br>Odd number of elements in anonymous hash at -e line 11.<br>$VAR1 = {<br>          '1' => 'b',<br>          'c' => 'a',<br>          'a' => {<br>                   'a' => 1,<br>                   'b' => 2<br>                 },<br>          'b' => [<br>                   'a',<br>                   1,<br>                   'b',<br>                   2<br>                 ],<br>          'HASH(0x10b8b70)' => undef,<br>          '2' => 'd'<br>        };<br></font></div><div id="yui_3_16_0_1_1429536093456_2391" dir="ltr"><font id="yui_3_16_0_1_1429536093456_2507" face="Courier New, courier, monaco, monospace, sans-serif"></font> </div></div></body></html>