the_sheriff has asked for the wisdom of the Perl Monks concerning the following question:
For that file I can run the following command to fix it:% grep "Children" index.html | od -c 0003060 C h i l d r e n 342 200 231 s
but since I have a ton of files scattered everywhere, I'd like to be able to do something like the following:% tr -s '\342\200\231' \' < file.html
...but no luck. I've read the part of perlfaq6 addressing this but it seems to say you can do this if you just search for the byte as if it was separate bytes...like what I have above...but there's a good chance I'm misunderstanding. Has anybody done something similar or have any suggestions?% perl -i -pe "s/\342\200\231/'/g" `find /home -name "*.html"`
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multibyte match works with tr but not in perl??
by belg4mit (Prior) on Jan 24, 2003 at 07:00 UTC | |
|
Re: multibyte match works with tr but not in perl??
by Enlil (Parson) on Jan 24, 2003 at 05:36 UTC | |
|
Re: multibyte match works with tr but not in perl??
by skx (Parson) on Jan 24, 2003 at 14:40 UTC |