http://qs321.pair.com?node_id=94144


in reply to Re: Win32 bad file descriptor
in thread Win32 bad file descriptor

I don't think that's the problem. Using parenthesis is perfectly OK. You have to watch out when you leave them out:

close MAIL || die "couldn't close: $!"; # oops! close MAIL or die "couldn't close: $!"; # correct close(MAIL) || die "couldn't close: $!"; # correct (original post) close(MAIL) or die "couldn't close: $!"; # correct as well
The point here is operator precedence. In the wrong example the || binds tighter than 'close'. That's why the low precedence logical operators (and, or, not, xor) were introduced.

-- Hofmator