Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
Don't ask to ask, just ask
 
PerlMonks  

Re: Array interpolation in Rakudo

by moritz (Cardinal)
on Aug 10, 2010 at 08:21 UTC ( #853977=note: print w/ replies, xml ) Need Help??


in reply to Array interpolation in Rakudo

The language has changed in that respect - arrays and hashes only interpolate into double-quoted strings if they end in a postcircumfix, that is any bracketing characters coming after an expression.

say "array: @array"; # interpolates nothing say "array: @array[]"; # interpolate all elements say "array: @array[1]"; # interpolate one element say "array: @array.sort"; # no interpolation, does not # end with something brackety say "array: @array.sort()"; # interpolates sorted array

Rakudo implements those cases according to the specification.

See also: strings, arrays, hashes, S02: Literals (scroll down)

Perl 6 - links to (nearly) everything that is Perl 6.


Comment on Re: Array interpolation in Rakudo
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2014-04-17 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls