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