$str = "the boy walked the dog"; $str =~ s/walked/fed/; $str =~ s/boy/girl/; $str =~ s/dog/Audrey II/;