Almost always the answer to the sort of probelm involves line end sequence characters. « is character 171 (0xab) and it is not at all clear to me how the normal line end characters (\n and \r) could mutate into that unless something is translating all unprintable characters into that. Assuming that to be the case:
Perl is expecting the line seperator character sequence to be a new line character ("\n"). If the application you are running is generating output for Windows or a Mac, or for various other purposes (network output for example), the line end may be a sequence of "\r\n" (for Windows and network) or "\r" for a Mac. I think it most likely that the odd character you are seeing is a "\r" which you could handle as:
$tm =~ s/[L\r]//;However I doubt that you really want an 'L' in there so most likely what you want is:
$tm =~ s/\r//;In reply to Re: Regex for replacing hidden character: « and L
by GrandFather
in thread Regex for replacing hidden character: « and L
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |