469,915 Members | 2,634 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,915 developers. It's quick & easy.

What's the dif between: @_[0] and $_[0] ?

Same question for arrays in general:
e.g. @myArray[3] vs. $myArray[3]

Most texts I've seen use the scalar version, but I've also seen the
array version. In simple testing I can't find a difference. Is this
just a case of "there's more than one way to do things", or are there
subtle differences I'm too new to have seen?

Thanks.

Jul 19 '05 #1
1 7176
user wrote:
Same question for arrays in general:
e.g. @myArray[3] vs. $myArray[3]

Most texts I've seen use the scalar version, but I've also seen the
array version. In simple testing I can't find a difference. Is
this just a case of "there's more than one way to do things", or
are there subtle differences I'm too new to have seen?


Enable warnings, and you'll notice a difference.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by buc | last post: by
3 posts views Thread by Amir Shitrit | last post: by
1 post views Thread by yogesh | last post: by
7 posts views Thread by Paulo | last post: by
10 posts views Thread by Ahmad Humayun | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.