in reply to how to write a function to decode email

Because chr is the reverse of ord, a portion of the decodeemail() sub might look something like this:

$email =~ s/&#(\d+);/chr($1)/eg;

...that is, if I understand the spec. But I suspect that you ought to use HTML::Entities or HTML::Entities::Numeric for both your encodeemail() and your decodeemail() subroutines anyway. It's more robust than the average home grown solution.


Dave

Replies are listed 'Best First'.
Re^2: how to write a function to decode email
by weihe (Initiate) on Apr 27, 2006 at 16:51 UTC
    thanks for all of you answer, my problem have solve just follow you.