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


in reply to Re: The High Price of Golf, and A Surprise
in thread The High Price of Golf, and A Surprise

Interesting:
$ perl -MO=Deparse,x7 -e'sort { $a cmp $b } @x' sort @x; -e syntax OK $ perl -MO=Deparse,x7 -e'sort { $b cmp $a } @x' sort @x; -e syntax OK $ perl -MO=Deparse,x7 -e'sort { $a <=> $b } @x' sort @x; -e syntax OK $ perl -MO=Deparse,x7 -e'sort { $b <=> $a } @x' sort @x; -e syntax OK
So far it looks as though B::Deparse is broken.
$ perl -MO=Deparse,x7 -e'sort { $a->[0] cmp $b->[0] } @x' sort {$$a[0] cmp $$b[0];} @x; -e syntax OK
Obviously, it is not. Looks rather like Perl has builtins for all the common cases, then.

Makeshifts last the longest.