#!/usr/bin/perl -w use strict; use warnings FATAL => 'all'; use HTML::Entities qw(encode_entities_numeric); $| = 1; my $mail = shift || die 'no mail'; my $href = sprintf "mailto:%s", $mail; $href = encode_entities_numeric $href, "\x00-\xFF"; my $text = encode_entities_numeric $mail, "\x00-\xFF"; printf "\n%s\n\n", $href, $text;