in reply to Swap Ascii chr() for null string

All is better with Perl 6 :-)
use v6; $_ = chr(65); .say; s/<{chr(65)}>/B/; .say;" # outputs A B
This made me trip and I had to ask on IRC where MasterDuke++ helped me out. I originally had
use v6; $_ = chr(65); .say; s/{"here".say; chr(65)}/B/; .say;" # outputs A her +e BA
which didn't work.

In Perl 6 code blocks can appear (pretty much) anywhere, and the code even runs here. It's return value just doesn't get used (for a reason I don't know yet) until you also use the angle brackets around the block. I couldn't find that in the docs for some reason.


holli

You can lead your users to water, but alas, you cannot drown them.