Your $line usually has a Newline at the end, which will be one of the characters that you are trimming.
If you want the newline back, you have to add it back, e.g.$line =~ substr( $line, -2, 2, '' ) . "\n"
In reply to Re^5: Trim Two Characters On Line
by soonix
in thread Trim Two Characters On Line
by jalopez453
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |