Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by raiph (Friar)
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 taking refuge in the Monastery: (17)
As of 2014-07-11 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (230 votes), past polls