in reply to Re: Understanding alternationin thread Understanding alternation
$text =~ s/\b(dog|cat|fox|cow|pig)\b/\n$1/g; [download]