Help for this page

Select Code to Download


  1. or download this
    print (Email::Valid->address('maurice@hevanet.com') ? 'yes' : 'no');
    
  2. or download this
    print (Email::Valid->address( -address => 'maurice@hevanet.com',
                                  -mxcheck => 1 ) ? 'yes' : 'no');
    
  3. or download this
    $addr = Email::Valid->address('Alfred Neuman <Neuman @ foo.bar>');
    print "$addr\n"; # prints Neuman@foo.bar
    
  4. or download this
    unless(Email::Valid->address('maurice@hevanet')) {
      print "address failed $Email::Valid::Details check.\n";
    }
    
  5. or download this
    eval {
      $addr = Email::Valid->address( -address => 'maurice@hevanet.com',
                                     -mxcheck => 1 );
    };
    warn "an error was encountered: $@" if $@;