#!/usr/local/bin/perl use strict; use warnings; my $string = "This is what you have"; if(substr($string, -14) =~ /have/){ print "You've already a good programmer!!\n"; } substr($string, 0, 5) =~ s/is/at/g; print "$string\n"; substr($string, 0, 1) ="S"; print "$string\n";