Don't ask to ask, just ask | |
PerlMonks |
Re^2: Trim Two Characters On Lineby AnomalousMonk (Archbishop) |
on Oct 23, 2020 at 04:26 UTC ( [id://11123072]=note: print w/replies, xml ) | Need Help?? |
$line =~ s/(SUM.*)(..)/$1/This does not seem to meet jalopez453's requirement. The strings 'SUMx' and 'SUM' both contain the substring 'SUM' and so should truncate to 'SU' and 'S' respectively, but do not. Also, I don't understand how the sequence of operations comes about. A typo? Give a man a fish: <%-{-{-{-<
In Section
Seekers of Perl Wisdom
|
|