473,703 Members | 2,336 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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?


Jul 19 '05 #1
1 7360
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: t0642k8 | last post by:
Help , the script is executing nice , until it come to the section below. The data out of the Database is a full string with whitespaces in between each word. For example it the variable is "the quick brown fox" the data retrieved from the array would be "the" //############################################### // Query DB for distinct Lab name
by: Mike M | last post by:
Hi all, I ahve the following SQL string but when i try to response.Write it there is a error where the ',' should be between "city" and "County" SQL = "INSERT * INTO customers (Company_Name, Category, Contact_Name, Contact_Title, Address_1, Address_2, City, County, Post_Code, Phone_1, Phone_2, Fax, Web_URL, email_Address, Delivery, Notes)" SQL = SQL & " VALUES('" & Request.Form("Company_Name") & "','" &
by: Showjumper | last post by:
Whats the diff between the 2 and when do you use one and not the other?
by: buc | last post by:
I have a simple combox on the screen that is bound via a datareader to a stored proc in sql that returns a simple string. The code is 'load stored proc then dReader = tmpSQL.SQLcmd.ExecuteReader() combobox1.DataSource = dReader dReader.Read() combobox1.DataTextField = dReader.GetName(0) combobox1.DataBind()
by: Amir Shitrit | last post by:
Hi to all. Whats the difference between DynamicInvoke and Invoke methods of the Delegate class? Thanks in advance.
by: czi02 | last post by:
Hi there;; Im wondering whats the difference between vb to visual basic. net??? Does the program was different to visual basic than vb.net ???
by: yogesh | last post by:
i have a code as follows TServerDB() { fDB = Server()->dbStorage->Create(); } or fDB=TServer->TMySQLBD->Create(); can any one tell the relationship between two and whats the <between braces called
by: Paulo | last post by:
Hi, what is diference between: File -New Web Site and File -New Project -VB/C# -Web Application ?????? VS 2005
by: czi02 | last post by:
Whats the difference between vb6.0 and a vb.net? Does the same language has an crystal report ? How can I make an crystal report?
by: Ahmad Humayun | last post by:
Whats the difference between: char str1 = "wxyz"; char* str2 = "abcd"; I can do this: str2 = str1 but I can't do this: str1 = str2
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.