use strict; use warnings; my $string = "catfood"; $string = substr($string,3,4); print "$string\n";