-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At some point hitherto, Peter Beardsley hath spake thusly: > I'm dealing with import data from a Mac that has non-ascii apostrophes that > are hex d5. I wrote a regular expression in perl to replace them: > > my $hex = 0xd5; > $str =~ s/$hex/\'/g;
You're assigning the value 213 (base 10) to $hex. Not the character. Try changing it to: my $hex = "\325"; I believe that will work. I tested this which worked for me: $str=~s/\325/FOO/; - -- Derek Martin [EMAIL PROTECTED] - --------------------------------------------- I prefer mail encrypted with PGP/GPG! GnuPG Key ID: 0x81CFE75D Retrieve my public key at http://pgp.mit.edu Learn more about it at http://www.gnupg.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8q4BpdjdlQoHP510RAtABAJ9e0P/vJ0FfTIGsIx18jnOPZcRQ5wCeIYQU fk+vfnh8vC6nhI3tzHgS7dQ= =vcn9 -----END PGP SIGNATURE----- ***************************************************************** To unsubscribe from this list, send mail to [EMAIL PROTECTED] with the text 'unsubscribe gnhlug' in the message body. *****************************************************************