Cool/useful short examples of Perl?

Jason Clifford jason at ukfsn.org
Mon May 30 19:35:43 BST 2011


On Mon, 2011-05-30 at 16:27 +0100, Denny wrote:
> >     if (! Email::Valid->address($email_address) ) {
> 
> Something wrong with 'unless'?

No but lots of people appear to find "if" to be more readable

If you're not worried about readability then why bother with either the
if or unless. Just do:

use Email::Valid;
Email::Valid->address($email_address) || print "Not valid";








More information about the london.pm mailing list