planet_guru has asked for the wisdom of the Perl Monks concerning the following question:
I have opened up the permissions on that temporary file and I'm tail -f'ing it to see what comes in, but the file doesn't grow at all. What's the obvious mistake please? thanks christomy $sock = new IO::Socket::INET ( PeerAddr => "$hostname", PeerPort => "$port", Blocking => 0, Proto => 'tcp', ); print $sock "Action: Login\r\n"; print $sock "UserName: $foo\r\n"; print $sock "Secret: $bar\r\n\r\n"; print $sock "Action: status\r\n\r\n"; $/="\r\n"; open(FH,">>/home/chris/statusdump.txt"); while(my $data=<$sock>){ $data =~ /[a-z]/ || next; print FH $data; } close FH;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Problems reading back from socket
by sgifford (Prior) on Nov 16, 2005 at 16:47 UTC | |
Re: Problems reading back from socket
by vek (Prior) on Nov 17, 2005 at 06:50 UTC | |
Re: Problems reading back from socket
by rupesh (Hermit) on Nov 16, 2005 at 13:00 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |