$ perl -i.bak -pe 's/\r$//' your-wordlist.file #### open my $wordhandle, "<:crlf", $wordfile or die ...