Oh come now, you mean you don't do
{ local $/ = 'eatMe'; chomp($str); }
What then?
$str =~ s/eatMe$//;
Or
$str = substr($str, 0, rindex($str, 'eatMe'));
Or
$pat = 'eatMe'; substr($str, rindex($str, $pat), length($pat), '');
Or ...
Chop on the other hand is definitely chomp's
evil twin brother. Admittedly I could probably
use chomp more, though s/// occurs to
me more readily. (It's so easy to whip out the
800 lb. gorilla).
--
perl -pe "s/\b;([st])/'\1/mg"
|