Crackers2 has asked for the wisdom of the Perl Monks concerning the following question:
Minimal code:
#!/usr/bin/perl use strict; use IO::Socket::INET; my $host = "www.google.com"; my $port = 80; my $fh = new IO::Socket::INET( PeerAddr => $host, PeerPort => $port, Proto => 'tcp', Timeout => 5, ) or die "$!"; print "sending\n"; print $fh "message\n"; print "send done\n";
This code runs fine on linux and windows when run as a script. However, if I make an executable out of it using pp (on windows), the script hangs after printing the "sending" message.
I admit that I haven't used pp before so perhaps I just need to add a parameter or something. Feel free to tell me to RTFM as long as you also include a link to that M, since google wasn't able to find it for me.
Perl version is ActivePerl Build 811 on windows 2000
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can't write to socket using pp ?
by starbolin (Hermit) on May 12, 2005 at 06:46 UTC |