While of course the correct solution is to use the correct regexp, any time you have a string which may or may not have an undesired newline at the end, chomp can fix the problem
As Occam said: Entia non sunt multiplicanda praeter necessitatem.
In reply to Re: Regex: Ignore \n in \S
by TomDLux
in thread Regex: Ignore \n in \S
by manav_gupta
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |