3 ms·
Like most code, this is way too easy in Perl 6. > perl6 -e 'say "Life, the Universe and Everything".WHY' 42
by labster 8y ago
Like most code, this is way too easy in Perl 6.
> perl6 -e 'say "Life, the Universe and Everything".WHY'
42
- sideshowb 8y agoFor non perl users - does this really work or are you being ironic?
- labster 8y agohttps://github.com/rakudo/rakudo/blob/master/src/core/Str.pm6#L21 https://github.com/rakudo/rakudo/blob/master/src/core/Str.pm... Oh, it works.
- sideshowb 8y agoToday I learned about meta methods. Thanks :)
- wongma 8y agoI searched for a Perl6 repl to try it on and it works! Perl is so whimsically fun. :) https://tio.run/#perl6 https://tio.run/#perl6