Hello,
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!!!
Help!
Thanks
Andy
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/