> I'm working on this perl script and its a chat server. When I
> run it I get perl debugger info from line 55 "Use of
> uninitialized value in concantenation (.) or string at
> telchat.pl line 50.". Anyone have any ideas what this could be from?
Your source code has only 38 lines so where is the line 50? Maybe it's
coming from other place in your stream?
~Mike L.
>
> #!/usr/bin/perl -w
> use IO::Socket;
> use IO::Select;
> use strict;
>
> my $port = 12;
> my $debugging = 1;
> my $serversock = IO::Socket::INET->new(LocalPort => $port,
> Type => SOCK_STREAM,
> Reuse => 1,
> Listen => SOMAXCONN)
> or die "Couldn't create server on $port: $!";
> my $selectobj = IO::Select->new;
> $selectobj->add($serversock);
>
> while(1) {
> my @ready = $selectobj->can_read(15);
> my $userinput;
> foreach my $handle (@ready) {
> if($handle == $serversock) {
> my $client = $serversock->accept;
> $selectobj->add($client);
> if($debugging) {
> my $hersockaddr = getpeername($client);
> my ($port, $iaddr) = sockaddr_in($hersockaddr);
> my $herhostname = gethostbyaddr($iaddr, AF_INET);
> my $herstraddr = inet_ntoa($iaddr);
> print "Remote client connection accepted from:
> $herhostname $herstraddr:$port\n";
> }
> } else {
> $userinput = <$handle>;
> }
> my @ready2 = $selectobj->can_write(15);
> foreach (@ready2){
> print $_ "$userinput\n";
> }
> }
> }
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs