in reply to String Length
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 ;-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: String Length
by buckaduck (Chaplain) on Apr 05, 2001 at 01:08 UTC | |
by cLive ;-) (Prior) on Apr 05, 2001 at 01:12 UTC | |
by merlyn (Sage) on Apr 05, 2001 at 17:52 UTC | |
by cLive ;-) (Prior) on Apr 05, 2001 at 22:21 UTC | |
by merlyn (Sage) on Apr 05, 2001 at 23:00 UTC |