The following code prints a 0, a 1, a 2, and an empty line. But which is which?
use 5.020; sub one { 1 } sub two { 2 } say one&two ; say &one&two ; say &one&&&two ; say &&&one&&&two;
It is not that difficult to figure out, it was a accidental discovery while messing around with syntax highlighting. For the friends of JAPH, here's one with five consecutive ampersands:
use 5.020; sub s { say }; $_ = 'Jusst another Perl hacker'; s&s&&&&&s
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: A twisty little maze of ampersands, all different
by kcott (Archbishop) on Jun 09, 2021 at 06:49 UTC |
Back to
Obfuscated Code