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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.