Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Win32 bad file descriptor

by Hofmator (Curate)
on Jul 05, 2001 at 20:02 UTC ( #94144=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://94144]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2022-12-08 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?