in reply to 2 basic questions
For 1 you can use a for loop, for 2 you can use substr
use warnings; use strict; my $check = "a"; $check++ for 1..3; print $check; print "\n"; my $input= "ab"; print substr $input, -1, 1; print "\n"; __END__ d b
In Section
Seekers of Perl Wisdom