> Similarly regarding || v.s. "or" you should expect newbies to do silly > things like improve the style of their program by removing parens. But it doesn't. > Thus you should give them "or" because it's the least likely to break > in that case: > open(my $fh, "<", $file) or die "Oh nohes"; # OK > open my $fh, "<", $file or die "Oh nohes"; # Removed parens: OK > open(my $fh, "<", $file) || die "Oh nohes"; # OK > open my $fh, "<", $file || die "Oh nohes"; # Removed parens: FAIL I just don't believe removing parens from arguments above makes things clearer. It's easier for me to read with them there. > Actually these days we should just avoid the whole issue and > recommend this: > use autodie; > open my $fh, "<", $file; Perhaps. --tomThread Previous | Thread Next