
Wierd Linux chat2.pl problem with sockname
I just finally *solved* (YAY) a wierd chat2.pl problem.
This probably only applies to Linux users (I'm 1.1.18) who use
perl 4pl036 or thereabouts.
The problem was that any attempts to "chat'open_port(...)" would
raise an error with bind:
Cannot assign requested address
After a couple of hours of man page reading, twiddling, etc., I figured
out that the assignment to $thisproc, which is used by chat's bind
routine to give a socket a name, should change from
$thisproc = pack($sockaddr, 2, 0, $thisaddr);
to
$thisproc = pack($sockaddr, 2, $thisaddr);
Can anyone explain why this is so? Is Linux's socket.h broken?
And why am I still getting
chat'close: Bad file number
?
Any clues on the {*filter*} issue would be appreciated, mail or news.
Cheers!
--