[Israel.pm] boolean statment as sub parameter

Levenglick Dov-RM07994 dov at freescale.com
Mon Feb 23 08:38:12 PST 2009

Without actually running, how about
opendir (DIR, $dir) and @dir = readdir DIR;
Instead of
opendir (DIR, $dir) or die;
Best Regards,
Dov Levenglick
SmartDSP OS Development Leader

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Yitzchak Scott-Thoennes
Sent: Monday, February 23, 2009 18:32
To: Perl in Israel
Subject: Re: [Israel.pm] boolean statment as sub parameter

On Sun, February 22, 2009 11:15 pm, Avishalom Shalit wrote:
> well an example for "and" is like a conditional (upon success)
> so do_this() and do_that() and do_the_other_thing() will only
> do_the_other_thing if the first two were successful

I meant it's hard to find a real example where it would be obviously
better to say

if (do_this() && do_that()) { do_the_other_thing() }


do_the_other_thing() if do_this() && do_that();

Perl mailing list
Perl at perl.org.il

More information about the Perl mailing list