Your string probably ends in "\r\n". You're chomping "\n", then complaining about the "\r" you didn't remove.
To verify, you can use:
use Data::Dumper; $Data::Dumper::Useqq = 1; print(Dumper($_));
Do a Super Search for solutions. This comes up all the time, once quite recently.
In reply to Re: Removing Newline Characters from File Data (chomp not working)
by ikegami
in thread Removing Newline Characters from File Data (chomp not working)
by mlux
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |