No regex needed as long as you're sure all will need last two chars removing. Here's an example.
# one way; my $day = '1ST'; my $num = substr ($day, 0, -2) print $num; # another, more fun way, if doing to $_; chop; chop; print; # so to print out a list for (@days) { print substr($_, 0, -2)."\n"; }
cLive ;-)
In reply to Re: String Length
by cLive ;-)
in thread String Length
by ep
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |