Okay, after having complained that other people's solutions don't work, at last I have a reasonably short version of my own. 113 characters:
sub f{ # 10 20 30 40 50 60 70 + 80 90 100 110 #23456789.123456789.123456789.123456789.123456789.123456789.123456789. +123456789.123456789.123456789.123456789.123 my%r;%i=@_;@{$r{$_}}{map{$_,keys%{$r{$_}}}@{$i{$_}}}=0for(@i=keys%i)x@ +i;sort{keys%{$r{$a}}<=>keys%{$r{$b}}}keys%r }
I think it will work on all correct data, but localtime is 02:20, which tends to leave me vulnerable, so I might have a different opinion in the morning. One thing I shall probably see in the morning is how to shorten that sort block. :-\
Update:Told you I'd shorten it -- at 111 characters:
sub f{ # 10 20 30 40 50 60 70 + 80 90 100 110 #23456789.123456789.123456789.123456789.123456789.123456789.123456789. +123456789.123456789.123456789.123456789.1 sub Q{keys%{$_[0]}}my%r;%i=@_;@{$r{$_}}{map{$_,Q$r{$_}}@{$i{$_}}}=0for +(@i=Q\%i)x@i;sort{Q($r{$a})- Q$r{$b}}Q\%r }
The Sidhekin
print "Just another Perl ${\(trickster and hacker)},"
In reply to Re: (Golf) Dependency List Prioritization
by Sidhekin
in thread (Golf) Dependency List Prioritization
by tadman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |