in reply to Formatted Output on glob-filehandles

This is a shot in the dark, so take it with a grain of salt.

Since you already have the output selected, don't pass it as a parameter to write. Quite possibly, it's being interpreted as an expression that holds a filehandle name rather than a filehandle. In other words, it may be trying to write to a filehandle named HASH(0xabcd) or some such. (That's the normal behaviour of write. Check out perlfunc:write.) If select has succeeded, then just call write with no parameter.

HTH

Replies are listed 'Best First'.
Re: Formatted Output on glob-filehandles
by theqblas (Initiate) on Oct 24, 2002 at 20:06 UTC

    Negatory. I had tried this before posting the message. I tried a few variations on this, like:

    # explicit file handle ($message) write($message); # implicitly use selected output stream write(); # Yah, I know this is wrong, but I had to try it. write(MSG);

    And as far as checking whether select() failed or not, I don't believe there is any way to do this (Please tell me I am wrong, because I can't accept that)