http://www.perlmonks.org?node_id=1010078


in reply to How to change these small one-liners into Perl6 code?

1:

print '218'.subst(rx/^18/, 3);

2: this is supposed to work with substr-rw, but doesn't with current rakudo.

3: Sorry, I don't even understand what this code does in Perl 5. Modifying and using a variable in the same statement is very detrimal for readability.

4: labels and goto aren't implemented in Rakudo. You can use prompt, or for lines() { } (since lines() is a lazy list, it doesn't read all the lines upfront; this was broken in some earlier Rakudo versions, but should be fine in the 2012-12 and possibly the 2012-11 releases).

I can recommend hanging out in the #perl6 IRC channel, we try to be helpful and friendly (and we succeed most of the time :-).