in reply to error: unrecognised character \xC2 at the end of line

I'm guessing you put a new-line after the -w (otherwise it would not report line 2).
A common cause of these kinds of errors is where the script is not in a text file format. Did you use a non-text format to save the script file, such as rtf or Word format? It should be a text file with no formatting.
  • Comment on Re: error: unrecognised character \xC2 at the end of line

Replies are listed 'Best First'.
Re^2: error: unrecognised character \xC2 at the end of line
by Anonymous Monk on Jun 16, 2009 at 07:34 UTC
    Thanks for the reply. I typed the program in vi editor and saved it. At the command prompt, typed 'perl filename.pl'. I got the error which I mentioned earlier.
      Save it as text/ASCII ... hexdump