s/\s+$//
Much better than chomp. Trailing whitespace should never be significant, so don't let it be.
- tye
In reply to Re^2: Carrige Return and Line Feed in Perl. (s/\s+$//)
by tye
in thread Carrige Return and Line Feed in Perl.
by dannyd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |