in reply to How to insert a new line?

print "\nhorse\n" if $_=~m/^dog$/