No, chomp works fine. On Unix the end of line \n is a single \cJ character, which is what it's removing. On CP/M derivatives it's \cM\cJ, so on wintendo it's removed correctly. Your problem is that you're transferring your file in such a way that it's preserving the other platform's end of line marker. Either transfer the file in such a way that line endings are translated, or use something like dos2unix to correct the line endings beforehand (or just use the same s/\cM+$// after the chomp to be sure).
In reply to Re: Why chomp doesn't work?
by Fletch
in thread Why chomp doesn't work?
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |