Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Win32 bad file descriptor

by OzzyOsbourne (Chaplain)
on Jul 05, 2001 at 19:35 UTC ( #94130=note: print w/replies, xml ) Need Help??


in reply to Win32 bad file descriptor

I never use parenthesis on my close statements. I would use close MAIL. I don't know if that helps, but it's all I really noticed.

-OzzyOsbourne

Replies are listed 'Best First'.
Re: Re: Win32 bad file descriptor
by Hofmator (Curate) on Jul 05, 2001 at 20:02 UTC

    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

Re: Re: Win32 bad file descriptor
by Dalin (Sexton) on Jul 05, 2001 at 19:45 UTC
    I tried that as well. At first I didn't have the parenthesis and added them, but no luck. Bradley
    Where ever there is confusion to be had... I'll be there.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2022-10-06 12:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (26 votes). Check out past polls.

    Notices?