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
In reply to Re: how to write a function to decode email
by davido
in thread how to write a function to decode email
by weihe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |