in reply to Re: (Golf) Anagram Finder
in thread (Golf) Anagram Finder
I like this method but why do you think this works (also 59):
@dict = qw (foo oof fff bar baz); $letters = 'ofo'; print anagram($letters, \@dict); sub anagram { grep{(join'',sort split//,$_[0])eq join'',sort/./g}@{pop()} }
But this does not
grep{(join'',sort split//,$_[0])eq join'',sort/./g}@{pop}
Why do you need the parens to make pop() work?
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: (Golf) Anagram Finder
by chipmunk (Parson) on Aug 04, 2001 at 18:34 UTC | |
by tadman (Prior) on Aug 04, 2001 at 18:49 UTC | |
by Sartak (Hermit) on Jul 26, 2006 at 18:38 UTC |