in reply to search and replace these unique characters

I'm not sure what those characters are, but when I am trying to identify unusual characters, I use the ord function:
#!/usr/bin/env perl use warnings; use strict; my $str = 'abcde'; for (split //, $str) { print "$_:", ord $_, ":\n"; }
Once you identify the characters, it will be easier to figure out a way of eliminating them.

Replies are listed 'Best First'.
Re^2: search and replace these unique characters
by graff (Chancellor) on Dec 05, 2007 at 03:05 UTC
    Somehow, character code point numbers are always easier for me to grok (and look up on code charts) when shown in hex; also, it can help to put in a "safe" placeholder for the non-printable ones -- otherwise, they can sometimes make the display somewhat confusing:
    for (split //, $str) { printf( "%s: %02x\n", (/[[:print:]]/) ? $_:".", ord()); }