On 3/21/07, Beginner <[EMAIL PROTECTED]> wrote:

s/\xc9/'&#'.$1.';'/                     # Hoping for &#201; from É

Your pattern didn't include parentheses, so there's no $1. Do you want
something like this, maybe?

   s!([^\x20-\x7e])! '&#' . ord($1) . ';' !ge;

Or you could just use HTML::Entities.

   http://search.cpan.org/~gaas/HTML-Parser-3.56/lib/HTML/Entities.pm

Cheers!

--Tom Phoenix
Stonehenge Perl Training

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to