The regex needs a '?' on the end... Its the difference between
/^a?b?c$/ and
/a?b?c?$/. Looking at it again, I only need to add one char to get it back though:
62 chars
# 1 2 3 4 5 6
#2345678901234567890123456789012345678901234567890123456789012
$;=join'?',sort@_;grep{chop;(join'',sort split//)=~/^$;?$/}<D>
Ah, but I can get it back with a little rearranging....
61 chars
# 1 2 3 4 5 6
#234567890123456789012345678901234567890123456789012345678901
@_=sort@_;$"='?';grep{chop;(join'',sort split//)=~/^@_?$/}<D>
-Blake