in reply to international domain names and email validation

What makes you think Mail::RFC822::Address cannot deal with e-mail addresses that contain non-ASCII characters?
use strict; use charnames ':full'; use Mail::RFC822::Address qw(valid); use Encode::Punycode; use Encode; my $email_address = "\N{ARABIC SIGN SALLALLAHOU ALAYHE WASSALLAM}" . ' +@' . "\N{CYPRIOT SYLLABLE TA}" . 'be'; my $puny = encode('Punycode', $email_address); print "$puny\n"; print "That's a valid unicode address\n" if valid($email_address); print "That's a valid Punycode address\n" if valid($email_address);
Output:
xn--@be-0we00514a That's a valid unicode address That's a valid Punycode address
Update: added Punycode representation.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James