Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: What is the difference between $array[1] and @array[1]?

by JavaFan (Canon)
on Apr 08, 2009 at 15:06 UTC ( [id://756357]=note: print w/replies, xml ) Need Help??


in reply to Re^2: What is the difference between $array[1] and @array[1]?
in thread What is the difference between $array[1] and @array[1]?

It used to be that in Perl, a '$' introduced a scalar value/variable (1 value), a '@' a list value/array (0, 1 or more values) and a '%' a hash variable. Life was simple, and sigils easy to explain.

Then we got perl5 and objects, and expressions like $obj->method, where the sigil is '$' even if the method is going to return multiple values. Life no longer is simple, and people got the feeling sigils are wrong and Perl6 will change how sigils are used.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://756357]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2025-01-15 05:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (46 votes). Check out past polls.