chomp removes whatever you tell it to via $/.
But you might be better off just using s/\s+\z//; instead of chomp;. Note: It removes trailing space and other whitespace in the process. That's usually a good thing.
In reply to Re: Win32/Linux portability
by ikegami
in thread Win32/Linux portability
by thelycaeum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |