kprasanna_79 has asked for the wisdom of the Perl Monks concerning the following question:
I have the below code
The first print gives the belowuse IO::Socket; chop (my $hostname = `hostname`); my $sock = new IO::Socket::INET ( PeerAddr => '10.106.2.43:25', LocalAddr => $hostname, Proto => 'tcp') || die "cant create socket$@\n"; print $sock "helo $hostname\n"; ($result = <$sock>); print $result."\n\n"; $sock->flush; print $sock "helo $hostname\n"; ($result = <$sock>); print $result."\n\n";
Where as subsequently it hangs without printing the second line.220 ildmailw102p Microsoft ESMTP MAIL Service, Version: 7.5.7601.17514 + ready at Tue, 1 Jul 2014 14:48:19 -0400
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Issue with Socket creation
by Corion (Patriarch) on Jul 01, 2014 at 19:01 UTC | |
by kprasanna_79 (Hermit) on Jul 01, 2014 at 19:08 UTC | |
by AppleFritter (Vicar) on Jul 01, 2014 at 21:02 UTC |