A word is an anagram if the letters in that word can be re-arranged to form a different word.
The shortest source code by character count to find
{split(toupper($1),a,"");asort(a);s="";for(i=1;a[i];)s=a[i++]s;x[s]=x[s]$1" "} END{for(i in x)if(x[i]~/ .* /)print x[i]}
AWK does not have a join function like Python, or it could have been shorter...
join
It assumes uppercase and lowercase as different.