http://www.perlmonks.org?node_id=410741


in reply to How can my tcp client call a sub directory when calling a socket connection?

This seems to work for me (though I am having bad luck with a D-Link modem at the moment):
my $sock = IO::Socket::INET->new( PeerAddr => $host, PeerPort => $port, Proto => 'tcp', Timeout => 5 ); unless ($sock) { $errormessage = $tr{'could not connect to http://$host:$port/$filen +ame'}; return '0'; } $sock->print("GET /".$filename." HTTP/1.0\r\n");
  • Comment on Re: How can my tcp client call a sub directory when calling a socket connection?
  • Download Code