#!/usr/bin/perl -w # /usr/local/bin/esc-mailto.pl # Conceal email address with javaScript. # by Jean-Sebastien Morisset (http://surniaulula.com/) use strict; my ($email, $text) = @ARGV; $text = $email if (!$text); if ($email && $text) { my $mailto = "$text"; $mailto =~ s/(.)/sprintf("%%%x", ord($1))/ge; print "\n"; } else { print "syntax: $0 {email_address} [optional_link_text]\n"; exit 1; } exit 0;