It is always a mistake to make trailing whitespace significant. So don't use chomp, use s/\s+$// instead. This has the side benefit of also preventing you from suffering from "\r"s.
- tye
In reply to Re: \r\n at end of line (\s)
by tye
in thread \r\n at end of line
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |