That's strange. They both work for me.# THIS WORKS print (OUT $line) || die "writing 'splat' $!"; # But putting || die on another line does not. i.e: # print (OUT $line) # || die "writing 'splat' $!";
Moreover, I see no reason why they would be different, in fact Deparse tells me they produce identical code:
Though you could dig further into the root cause of the difference you experienced, I suggest you just stick to the low precedence or and avoid parens with print as described earlier.% cat id1.pl print (OUT $line) || die "writing 'splat' $!"; % perl -MO=Deparse id1.pl die "writing 'splat' $!" unless print OUT $line; id1.pl syntax OK % cat id2.pl print (OUT $line) || die "writing 'splat' $!"; % perl -MO=Deparse id2.pl die "writing 'splat' $!" unless print OUT $line; id2.pl syntax OK
In reply to Re^3: Ulimit being reached
by eyepopslikeamosquito
in thread Ulimit being reached
by viffer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |