From owner-freebsd-questions@freebsd.org Mon Jan 4 12:49:43 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BFF83A602FF for ; Mon, 4 Jan 2016 12:49:43 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 876511D7D for ; Mon, 4 Jan 2016 12:49:42 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from [82.113.99.186] (helo=localhost.unixarea.de) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1aG4Zo-0000KX-2K; Mon, 04 Jan 2016 13:49:32 +0100 Received: from localhost.my.domain (c720-r285885-amd64 [127.0.0.1]) by localhost.unixarea.de (8.15.2/8.14.9) with ESMTPS id u04CnSA7004456 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 4 Jan 2016 13:49:28 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.15.2/8.14.9/Submit) id u04CnR0p004455; Mon, 4 Jan 2016 13:49:27 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Mon, 4 Jan 2016 13:49:26 +0100 From: Matthias Apitz To: freebsd-questions@freebsd.org Cc: pdw@ex-parrot.com Subject: ports/p5-Mail-RFC822-Address does not work as expected/described Message-ID: <20160104124926.GA4417@c720-r285885-amd64> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , freebsd-questions@freebsd.org, pdw@ex-parrot.com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Operating-System: FreeBSD 11.0-CURRENT r285885 (amd64) User-Agent: Mutt/1.5.23 (2014-03-12) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 82.113.99.186 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2016 12:49:43 -0000 Hello, I installed from the ports the port p5-Mail-RFC822-Address to verify mail addrs against RFC822; the example code provided by the author is: #!/usr/local/bin/perl use Mail::RFC822::Address qw(valid validlist); if (valid("pdw@ex-parrot.com")) { print "That's a valid address\n"; } if (validlist("pdw@ex-parrot.com, other@elsewhere.com")) { print "That's a valid list of addresses\n"; } But I can only manage to get this working when doing the test as if (valid("pdw@ex-parrot.com") == true) { ... Why is this? I'm by no means a Perl expert :-) Thx matthias -- Matthias Apitz, ✉ guru@unixarea.de, 🌐 http://www.unixarea.de/ ☎ +49-176-38902045