You are right.  I don&#39;t have warnings turned on.  I was just looking over his script.  (normally I use warnings)<br><br>Thanks<br><br>Jay<br><br><div class="gmail_quote">On Thu, Oct 1, 2009 at 5:00 PM, Kent Cowgill <span dir="ltr">&lt;<a href="mailto:kent@c2group.net">kent@c2group.net</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 class="im"><br>
On Oct 1, 2009, at 4:42 PM, Jay Strauss wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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>
</blockquote>
<br></div>
You must not have warnings turned on.<br>
<br>
@array[ @indices ] is a valid way to produce a slice of array values, but when there&#39;s only one index, the @ sigil doesn&#39;t make much sense.  And when you have warnings turned on, perl tells you that it doesn&#39;t make sense:<br>

<br>
Scalar value @array[2] better written as $array[2] at &lt;filename&gt; line &lt;blah blah&gt;.<br>
<br>
<br>
Kent Cowgill                                     <a href="mailto:kent@c2group.net" target="_blank">kent@c2group.net</a><br>
<br>
<a href="http://kentcowgill.org/blog" target="_blank">http://kentcowgill.org/blog</a>           <a href="http://youtube.com/kcowgill" target="_blank">http://youtube.com/kcowgill</a><br>
<a href="http://kentcowgill.org/photos" target="_blank">http://kentcowgill.org/photos</a>   <a href="http://flickr.com/people/kcowgill" target="_blank">http://flickr.com/people/kcowgill</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Chicago-talk mailing list<br>
<a href="mailto:Chicago-talk@pm.org" target="_blank">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>