my @words = split(" ", "Hello, I live in a blue hoose."); for (@words) { my @spell = `echo $_ | ispell -a -S`; if (grep /^\*/, @spell) { next; }else{ @spell = grep /^\s*&/, @spell; chomp $spell[0]; my @rest = split(/\ |\,\ /,$spell[0]); @rest = splice(@rest,4); if (scalar(@rest) != 0) { print "Alternate spellings for $_: @rest\n"; } } }