<br><br><div class="gmail_quote">On Thu, Jan 14, 2010 at 9:07 AM, Michael R. Wolf <span dir="ltr">&lt;<a href="mailto:michaelrwolf@att.net">michaelrwolf@att.net</a>&gt;</span> wrote:<br><br>&gt; use strict;<br>&gt; use warnings;<br>
&gt; ...<br>&gt; my $x =&gt; rand;<br>&gt;  die &#39;Did you notice fat comma instead of assignment? Variable did not &gt;  get<br>set&#39; unless defined $x;<br><br>&gt; In retrospect, what had me miss it was:<br>&gt;  1 - the visual similarity between &#39;=&#39; and &#39;=&gt;&#39;<br>
&gt;  2 - the similarity of meaning between &quot;gets&quot; (assignment) and &quot;gets<br>&gt;  associated with&quot; (fat comma&#39;s common use in creating hash key/value &gt; pairs)<br><br>&gt; Can you think of a good use of fat comma (or skinny comma, for that<br>
&gt; matter) in this context?  Or, framed differently, why shouldn&#39;t (or can&#39;t) it<br>&gt; get a warning like &quot;Strange mixture of declaration, stringification, and<br>&gt; function call in void context&quot;?<br>
<br>I can&#39;t think of good use for fat/skinny comma in that context but<br>maybe a more devious mind is needed..<br><br>It does seem odd that rand (srand too) don&#39;t warn since other<br>arithmetic functions do:<br><br>
  perl -wle &#39;my $x =&gt; sin&#39;<br>  Useless use of sin in void context ...<br>  Use of uninitialized value $_ in sin ...<br><br>  and similiar warnings for cos, exp, int, log ..<br><br>-- <br>Charles DeRykus<br><br>
<br></div>