in reply to 2 basic questions
- The string increment is magical, but no other string operations are. Therefore, if you do not want to resort to ord arithmetics, you have to repeat the increment:
my $check = 'a'; $check++ for 1 .. 5;
- TIMTOWTDI. You can for example use substr:
my $check = 'cd'; substr $check, 0, 1, q();
Or, use a substitution:
my $check = 'sp'; $check =~ s/^.//;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
|
---|
In Section
Seekers of Perl Wisdom