Can someone publish more of this code...I tried to emulate this by guessing and came up with this:<div><br></div><div>-- snip --</div><div><br></div><div><div>#!/usr/bin/perl -w</div><div>use strict;</div><div>use Data::Dumper;</div>
<div><br></div><div>my %hash = ();</div><div>my @junk = qw|a b c d e f g|;</div><div><br></div><div>for(@junk)</div><div>{</div><div> push @{{\%hash}->{'something'}},{id=>$_};</div><div>}</div><div>print Dumper %hash;</div>
<div><br></div><div>-- end snip --</div><div><br></div><div>This kicks out all kinds of errors:</div><div><br></div><div>Odd number of elements in anonymous hash at <a href="http://hashref.pl">hashref.pl</a> line 11.</div>
<div><br></div><div><br></div><div><br></div><br><div class="gmail_quote">On Thu, Apr 8, 2010 at 10:18 AM, imran javaid <span dir="ltr"><<a href="mailto:imranjj@gmail.com">imranjj@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
what if you had used the following?<br>
<div class="im">push @{%hash{$odate}}, {id => $id, ..<br>
<br>
</div><font color="#888888">-imran<br>
</font><div><div></div><div class="h5"><br>
On Thu, Apr 8, 2010 at 9:42 AM, Brad Doty <<a href="mailto:bdoty@eqtc.com">bdoty@eqtc.com</a>> wrote:<br>
> Speaking of PM as a source for assistance...<br>
><br>
> I was just composing a note to ask you guys how to solve a pesky warning<br>
> in inherited code. My fear of embarrassment in front of the entire<br>
> group made me review my terms more precisely, which suggested a<br>
> solution. And it worked!<br>
><br>
> So thanks, ChicagoPM, for helping me solve my problem.<br>
><br>
> My solution is this<br>
><br>
> 940c940<br>
> <old push @{%hash->{$odate}}, {id => $id, ...<br>
> ---<br>
>>new push @{{\%hash}->{$odate}}, {id => $id, ...<br>
><br>
> Any critiques or better ideas to avoid using hash as a reference?<br>
><br>
><br>
> Thanks,<br>
><br>
> Brad<br>
><br>
><br>
> _______________________________________________<br>
> Chicago-talk mailing list<br>
> <a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
> <a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
><br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org">Chicago-talk@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/chicago-talk" target="_blank">http://mail.pm.org/mailman/listinfo/chicago-talk</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Sincerely,<br><br><br>Joel Limardo<br>Chief Software Engineer<br>ForwardPhase Technologies, LLC <br>401 N. Michigan Avenue<br>Suite 1200-10<br>Chicago, IL 60611<br>
<a href="http://www.forwardphase.com">www.forwardphase.com</a><br><a href="mailto:joel.limardo@forwardphase.com">joel.limardo@forwardphase.com</a><br>LinkedIn: <a href="http://www.linkedin.com/in/joellimardo">http://www.linkedin.com/in/joellimardo</a><br>
Twitter: <a href="http://twitter.com/joellimardo">http://twitter.com/joellimardo</a><br>Fax: 815-346-9495<br>Ph : 877-321-5467<br>
</div>