Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Re: (Golf) Dependency List Prioritization

by Juerd (Abbot)
on Mar 15, 2002 at 10:00 UTC ( [id://151996]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: (Golf) Dependency List Prioritization
in thread (Golf) Dependency List Prioritization

I hope you don't mind me removing a few bytes:

sub f{for(values(%h=@_)){$h{$_}||=[]for@$_}sort{(grep/^$b$/,@{$h{$a}}) +||-1}keys%h}
(Note: I didn't test)

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk

Replies are listed 'Best First'.
Re (tilly) 4: (Golf) Dependency List Prioritization
by tilly (Archbishop) on Mar 15, 2002 at 10:42 UTC
    If you test, you will find it doesn't compile.

      If you test, you will find it doesn't compile.

      Perl doesn't DWIM :(
      It was worth a try, it was not worth a post. I should have tested first.

      U28geW91IGNhbiBhbGwgcm90MTMgY
      W5kIHBhY2soKS4gQnV0IGRvIHlvdS
      ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
      geW91IHNlZSBpdD8gIC0tIEp1ZXJk
      

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://151996]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.