472,127 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,127 software developers and data experts.

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 7293
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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.