#! perl use strict; use warnings; my $new_msg = 'I have apples,

pineapples, and pieces of fruit. Yes, I do have apples!'; my $count = 7; my $pcnt = 5; my $total = $count + $pcnt; print "\nBefore applying the substitutions, \$new_msg is:\n$new_msg\n"; $new_msg =~ s//$count/g; $new_msg =~ s/

/$pcnt/g; $new_msg =~ s//$total/g; print "\nAfter applying the substitutions, \$new_msg is now:\n$new_msg\n";