Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Low level socket question.

by crouchingpenguin (Priest)
on Jun 25, 2003 at 12:05 UTC ( #268822=note: print w/replies, xml ) Need Help??

in reply to Low level socket question.

How about just using IO::Socket?

#!/usr/bin/perl $|++; use strict; use warnings; use IO::Socket; my $host = ''; my $port = 80; my $socket = IO::Socket::INET->new( PeerHost => $host, PeerPort => $port, Timeout => 5, ) or die "Failed to connect to $host on $port: $!"; $socket->autoflush(1); print "Host reached\n-----------------\n" ; my $lines = 'GET /index.html'; $socket->send($lines . "\n"); while( defined( my $line = $socket->getline() ) ){ print $line; }

"Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic."

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://268822]
[LanX]: any news from tye ' s search?
[MidLifeXis]: Ugh - who else?
[Discipulus]: so the right term is 'gired'
[Discipulus]: look at ot by karl
Discipulus gired: adj the work position that stands between hired and fired..
LanX recommends inner immigration, work less hard and enjoy pay roll
[MidLifeXis]: ahh, yeah, didn't look through nodes yet today.
[erix]: haha
[MidLifeXis]: Ahh well, time to get back to it, so there isn't a reason to take that choice out of my hands :-)
[LanX]: Inner emigration

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (14)
As of 2017-03-23 12:46 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (286 votes). Check out past polls.