Try unbuffer IO, this might be on off the Problem. $| = 1;
the don´t do: > > while (true) { > > $socket->recv($text,128); > > print $text; > > } do > > while ($socket->recv($text,128)) { > > print $text; > > } Byebye, Bo Stewart Anderson <[EMAIL PROTECTED]> hat am 24. September 2008 um 13:35 geschrieben: > > -----Original Message----- > > From: Andy Dixon [mailto:[EMAIL PROTECTED] > > Sent: 24 September 2008 12:26 > > To: beginners@perl.org > > Subject: Perl Sockets oddity.. > > > > 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!!! > > > [Stewart Anderson] > Is it that perl is interpolating $text and your argument has > symbols in it ? Quoting the var might help? > > > > Information in this email including any attachments may be privileged, > confidential and is intended exclusively for the addressee. The views > expressed may not be official policy, but the personal views of the > originator. If you have received it in error, please notify the sender by > return e-mail and delete it from your system. You should not reproduce, > distribute, store, retransmit, use or disclose its contents to anyone. Please > note we reserve the right to monitor all e-mail communication through our > internal and external networks. SKY and the SKY marks are trade marks of > British Sky Broadcasting Group plc and are used under licence. British Sky > Broadcasting Limited (Registration No. 2906991), Sky Interactive Limited > (Registration No. 3554332), Sky-In-Home Service Limited (Registration No. > 2067075) and Sky Subscribers Services Limited (Registration No. 2340150) are > direct or indirect subsidiaries of British Sky Broadcasting Group plc > (Registration No. 2247735). All of the companies mentioned in this paragraph > are incorporated in England and Wales and share the same registered office at > Grant Way, Isleworth, Middlesex TW7 5QD. > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > http://learn.perl.org/ > >