my $result = substr($string,2,6,''); print $result,"\n"; # Result is 234567