#!/usr/bin/perl use strict; use warnings; my $string = 'I like cats. I think cats are nice.'; print $string =~ s/cat/dog/g;