in reply to Re: Understanding alternation
in thread Understanding alternation

I'd throw a couple of \b's in there, so it only matches on word boundaries. eg:
$text =~ s/\b(dog|cat|fox|cow|pig)\b/\n$1/g;
Otherwise, you'd match stuff like "cowardly" and "pigheaded" ;)