in reply to Can I change the definition of '\s'?

It might not seem any different than davorg's solution, but using qr instead of quotes is better. It makes the syntax less problematic if the sub-expression has any special characters in it!

my $space= qr/[\s\xA0]/;
Hmm, your code sample doesn't parse (you said s// not s///) and it's finding leading OR trailing space. Assuming you just forgot a slash, it will strip leading space if it exists and leave trailing, or strip trailing if there was no leading.