in reply to Re^6: Anagrams & Letter Banks
in thread Anagrams & Letter Banks
Thank you, Laurent_R. If it is the case that grep outputs the values themselves that are true, how is it that the
next unless grep !/(.).*\1/, @list;line appears to be doing what I want it to in this:
If grep outputs the words themselves, why is the "next unless" part working?for (sort keys %words) { my @list = sort @{$words{$_}}; next unless @list > 1; next unless grep !/(.).*\1/, @list; print "@list\n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^8: Anagrams & Letter Banks
by Cristoforo (Curate) on Oct 27, 2017 at 22:23 UTC |
In Section
Seekers of Perl Wisdom