My advice is to NEVER put your email address on a webpage, because it is easy for evil search bots to scrape that type of data and use it for spam.

Here's a perl script I use to convert an email address into a snippet of javascript. You insert this javascript into your html page, and it will look like a "click here to email me" link, but if you view the source you'll just see obfuscated javascript code. It's not super secure, but should be enough to thwart most spam bots.

# script to obfuscate email addresses for web pages. # just copy-n-paste the output into your web page use strict; my $email = 'first.last@mycompany.com'; # edit this line - your email +goes here print obfuscate_email($email), "\n"; sub obfuscate_email { my $email = shift; my $string = "<a href=\"mailto:" . $email . "\">" . $email . "</a>"; + return obfuscate_text($string); } sub obfuscate_text { my $string = shift; $string =~ tr/[a-mn-zA-MN-Z]/[n-za-mN-ZA-M]/; # rot13 $string =~ s/@/&#64;/g; # swap @ for the html + character code $string =~ s/"/\\"/g; # escape doublequotes $string =~ s/\./\056/g; # swap the dots with +javascript . characters my @charset = ('a'..'z','A'..'Z'); # randomize variable name - (3 char) my $c = join '', @charset[rand @charset, rand @charset, rand @charse +t]; my $result = "<script type=\"text/javascript\">document.write(\"$s +tring\"." . "replace(/[a-zA-Z]/g, function($c){return String.fromCharCode(($ +c<=\"Z\"?90:122)" . ">=($c=$c.charCodeAt(0)+13)?$c:$c-26);}));</script>"; return $result; }

In reply to Re: Spam filters with registrar based filtering? by scorpio17
in thread Spam filters with registrar based filtering? by dwm042

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.