On Tue, Jun 05, 2001 at 10:42:33AM -0700, Paul wrote:
> If you use "or" instead of "||" you can reduce the "line noise" by
> taking out the parens.
> 
>    open(FILE, $filename) 
>        || die("Unable to open file \"$filename\": \l$!.\n");
> 
> becomes
> 
>    open FILE, $filename 
>         or die "Unable to open file \"$filename\": \l$!.\n";

Personally, I prefer the "noisy" version, though I consider it anything but
noisy.  Perhaps it's because 'or' came sometime after I learned Perl, but
mostly it's because it serves to delineate what's what.  This may be an
artifact of my C experience, or my penchant to use parens in order to give
visual seperation from one function call to another.

TIMTOWTDI


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to