Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Word with most anagram

by boo_radley (Parson)
on Jan 29, 2003 at 14:19 UTC ( [id://230951]=note: print w/replies, xml ) Need Help??


in reply to Word with most anagram

neat stuff.
8:
  • asper
  • pares
  • parse
  • pears
  • rapes
  • reaps
  • spare
  • spear
Comments : you seem to never use $length for anything interesting -- just as an added layer of complexity to your %word hash. You can remove it when referring to %words keys and achieve the same results :
push @{$word{$sorted_word}}, $_;
and so on.
Also, you can replace
@most_ref=(); push @most_ref, \@{$word{$length}{$sorted_word}};

with
@most_ref=(\@{$word{$sorted_word}});

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://230951]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-19 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found