Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (16)
As of 2015-11-24 22:16 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (664 votes), past polls