I wish you good luck on your journey through the darkest corners of Perl.
Here’s a golfed and obfuscated JAPH using the DESTROY trick:
sub'DESTROY{print${+pop}}bless\$_,for',rekcah lreP rehtona tsuJ'=~/./gThe second argument of bless defaults to ::main, which is the package where subs declared without a package prefix go to. You don’t need the temporary array: the SV’s are still created and blessed even if map is used in void context (other built-ins, like sort, won’t let you do this). This causes them to be GC’d in reverse order, though.
In reply to Re: Destructive JAPH
by Grimy
in thread Destructive JAPH
by MidLifeXis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |