in reply to Print from array element to another array element
You could also work on a copy of the original string by assigning the value to a separate string say :use strict; use warnings; my $string = "catfood"; $string = substr($string,3,4); print "$string\n";
my $new_string = substr($string,3,4);
|
|---|