#!/usr/bin/perl$name="Tom";print "Hello Tom\n" if $name =~ /Tom/; print "$name\n" if $name !~ /Tom/; $name =~ s/T/M/; # Substitute first T with an Mprint "$name.\n";