in reply to Trim Two Characters On Line
substr( $line, -2, 2, '' ) if $line =~ /sum/;
You may want to remove the second and third last character, leaving a newline at the end.
substr( $line, -3, 2, '' ) if $line =~ /sum/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trim Two Characters On Line
by jalopez453 (Acolyte) on Oct 23, 2020 at 16:24 UTC | |
by afoken (Chancellor) on Oct 23, 2020 at 18:07 UTC | |
by jalopez453 (Acolyte) on Oct 23, 2020 at 19:20 UTC | |
by AnomalousMonk (Archbishop) on Oct 23, 2020 at 21:53 UTC | |
by hippo (Archbishop) on Oct 23, 2020 at 20:38 UTC | |
by soonix (Chancellor) on Oct 23, 2020 at 22:02 UTC | |
by AnomalousMonk (Archbishop) on Oct 23, 2020 at 22:18 UTC | |
by BillKSmith (Monsignor) on Oct 24, 2020 at 16:59 UTC |