in reply to Print from array element to another array element
The easiest way to do it would be to use substr
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);
In Section
Seekers of Perl Wisdom