Andy Dixon wrote: > > I may be being a bit dim, but I wrote this: > > #!/usr/bin/perl -w > use IO::Socket::INET; > print "ISONAS Logger (perl) v1\n"; > my $socket = IO::Socket::INET->new( > PeerAddr => "10.9.1.100", > PeerPort => "5321" > ) or die $!; > > print "Connected.\n"; > > $socket->print("<login>|"); > > while (true) { > $socket->recv($text,128); > print $text; > } > > > The data gets sent to the server, and data comes back, but does not > get displayed on the screen. However, if I change the while() to > while($text==$text), I get the following error: > > Use of uninitialized value in numeric eq (==) at ilog.pl line 13. > Use of uninitialized value in numeric eq (==) at ilog.pl line 13. > Use of uninitialized value in print at ilog.pl line 14. > Argument "< 9/24/2008><12:25:43><LOGON>|" isn't numeric in numeric eq > (==) at ilog.pl line 16. > Argument "< 9/24/2008><12:25:43><LOGON ACCEPTED>||" isn't numeric in > numeric eq (==) at ilog.pl line 16. > > So, $text does contain the result, but for some reason it will not > print to the screen. I'm stuck!!!
What version of perl interpreter are you using Andy? This will tell you if you don't know perl -v 5.8 or 5.10 should be fine. You could also probably get away with 5.6. If it's reasonably recent you should be getting the warning Unquoted string "true" may clash with future reserved word You should also take a look at the version of IO::Socket::INET using this perl -MIO::Socket::INET -e 'print $IO::Socket::INET::VERSION' The current version is 1.31, but anything after 1.18 should be fine. Cheers, Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/