Yeah, I see that now.<br><br>Thanks<br>Jay<br><br><div class="gmail_quote">On Thu, Oct 1, 2009 at 5:07 PM, tiger peng <span dir="ltr">&lt;<a href="mailto:tigerpeng2001@yahoo.com">tigerpeng2001@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><div> </div>
<div>@array[2] is just an array with one element. (&#39;a&#39;) ; and print prints out the element.<br></div>
<div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2">
<hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Jay Strauss &lt;<a href="mailto:me@heyjay.com" target="_blank">me@heyjay.com</a>&gt;<br><b><span style="font-weight: bold;">To:</span></b> Chicago.pm chatter &lt;<a href="mailto:chicago-talk@pm.org" target="_blank">chicago-talk@pm.org</a>&gt;<br>
<b><span style="font-weight: bold;">Sent:</span></b> Thu, October 1, 2009 4:42:09 PM<br><b><span style="font-weight: bold;">Subject:</span></b> [Chicago-talk] Using &quot;@&quot; to reference element in array<br></font><div>
<div></div><div class="h5"><br>Hi,<br><br>I just got a script at work where the writer used:<br><br>my @array = qw[adf af a adf asdfd];<br>print @array[2];<br><br>And it works!!<br><br>I thought that notation didn&#39;t go into effect until Perl6.<br>
<br>I&#39;ve always done $array[2], and never tried the style above.  Is there any reason not to adopt the style above in future Perl5 programming?<br><br>Thanks<br>Jay<br></div></div></div></div></div></div><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></blockquote></div><br>