s/\s+$// has failed me for the first time and I'll be damned if I can see why.
I'm slurping up a remote HTML file and parsing it. I've got lines that are basically being jammed into a db field, but they're carrying trailing spaces, which is bad. I'm doing all the usual tricks (chomp, strip trailing spaces, assume Windows format), but I can't get rid of them.
The only clue I have is when I view hidden characters in an editor, there are spaces at the end of the line... not something that's recognized by the editor as a space, mind you, just spaces with no character representation. Not a paragraph end, not a space character... just a blank space.
Has anyone run into this and/or have something else for me to try? List of what I'm running the lines through below for reference:
UPDATE: It was ASCII 160 that was causing the problem. I'm going to follow the suggestion to just strip out all control characters, I think. Appreciate the speedy suggestions and help.
In reply to When is a trailing space not a trailing space? by markguy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |