in reply to Unregognized character \xA0

Let me guess, you have recently copied a perl script from DOS/Windows to Unix/Linux, and you didn't convert it to unix format...

Use vi... (^V^M = [Ctrl-V][Ctrl-M])
vi file.pl :%s/^V^M//g :x

or use the dos2unix utility.

Replies are listed 'Best First'.
Re: Re: Unregognized character \xA0
by Anonymous Monk on Feb 02, 2004 at 01:44 UTC
    No, I'm writing this myself. My complete script looks like the one at the bottom of this node. But you're right, this IS running on Windows.
    #!/usr/bin/perl use strict; use warnings; my %numbers = ( "one" => "1", "two"  => "2", "three" => "3" ); print $numbers{"one"};
      Ok, seems to me that your problem is actually the other-way-round. You created the file in unix format and it does not run under DOS/Windows. Just run the utility unix2dos to convert your script from unix format to dos format.

      Update:

      I copied this from a website, there was text formatting when I copied it over into Notepad ...

      Aha, you didn't mention about that. Problem solved... ;-)