in reply to `print CLIENT` seems to send nothing with `use Socket`

Two things occur to me:
  1. You might be suffering from buffering - did you try to do select CLIENT; $|=1;?
  2. I always feel nervous writing to pipes with print - my C background insists that one should write to pipes with the closest-to-the-metal functions available, so I always used syswrite, as in:
    $msg="+OK\n"; syswrite(CLIENT,$msg);
    In addition, syswrite will return the number of bytes actually written, which should help you with your debugging.

Replies are listed 'Best First'.
Re: Re: `print CLIENT` seems to send nothing with `use Socket`
by muba (Priest) on Apr 03, 2004 at 16:42 UTC
    Doh! I should have known about $|=1. I just saw your words 'suffering from buffering' and I thought 'maybe I should use $|'... that did the job!

    Thank you!

    You see... it is a FAQ-related question :)