more useful options | |
PerlMonks |
Re: Trim Two Characters On Lineby LanX (Saint) |
on Oct 22, 2020 at 23:23 UTC ( [id://11123063]=note: print w/replies, xml ) | Need Help?? |
$line =~ s/(SUM.*)(..)/$1/ should meet your requirement. Bonus: $2 will hold the truncated characters. Demo in the debugger
Update: typo fixed in DB<1> , thx to AnomalousMonk for spotting.
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|