Problem
You want to obfuscate an e-mail address to prevent spam-bots from sniffing it.
Solution
Use the HTML::email() method.
This method takes one argument, the email address.
$email = HTML::email('[email protected]');
Now $email will display correctly in browsers, but it will randomly contain characters that make it hard to read.
Email is <b>me@local.com</b>
Discussion
This method uses the HTML::obfuscate() method to obfuscate the email address.
See Obfuscating a String.
