Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 chilling in the Monastery: (12)
As of 2015-07-31 08:21 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 (275 votes), past polls