note
ambrus
<p>
I've just seen a variant of this operator, the <b>twin baby cart</b>, <c>"@{[...]}[...]"</c> come up in golf. The original context is the golf task [http://golf.shinh.org/p.rb?hello+hello+world] where it's used by the winner perl entries by tails and tybalt89.
<p>
This combines list slice indexing with interpolation of the baby cart operator, and is particularly useful because the array interpolation makes sure spaces (the default value of $") are added between the items. An example is:
<c>
"@{[zero,one,two,three,four,five]}[3,1,4,1,5]"
</c>
has the result "three one four one five".
<!-- kw: twin baby carriage, twin pram, "@{[...]}[...]", "${[...]}[...]", "@{[]}[]", "${[]}[]" -->
285498
285498