http://www.perlmonks.org?node_id=393153


in reply to Re: nested combinations: algorithm advice?
in thread nested combinations: algorithm advice?

#!/usr/bin/perl -lapF_ for$p(@p){$;.="$_ and $p "if 1<grep"@F"=~$_,split/_/,$p}push@p,$_}{$_=$