Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^4: Perl 6 <-> Perl 5 bridges (was Re^2: Capturing parenthesis and grouping square brackets)

by raiph (Hermit)
on Jun 21, 2013 at 11:50 UTC ( #1040134=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Perl 6 <-> Perl 5 bridges (was Re^2: Capturing parenthesis and grouping square brackets)
in thread Capturing parenthesis and grouping square brackets

So what's the difference between $array and @array then?

$ indicates that a variable will behave as if its content were a singular thing. That singular thing could be a number, string, routine, object, etc. -- or an array or hash. In list context its content will evaluate to be a singular thing; if it's actually plural, that singular thing will be a reference to the plural thing.

@ indicates that a variable will behave as if its content were a plural thing. If the content is actually singular it behaves like a 1 element array.


Comment on Re^4: Perl 6 <-> Perl 5 bridges (was Re^2: Capturing parenthesis and grouping square brackets)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2015-08-01 03:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (285 votes), past polls