stevenrh has asked for the wisdom of the Perl Monks concerning the following question:
$file = '/home/steven/http.list'; open(INFO, $file); @lines = <INFO>; close(INFO);
foreach $i(@lines){
#!/usr/bin/perl -w use strict; use IO::Socket; my $sock = new IO::Socket::INET ( PeerAddr => 'website.org', PeerPort => '80', Proto =>'tcp', ); die "Could not create socket: $!\n" unless $sock; print $sock ""this is where i need my http statement to go (from the f +ile list"; close($sock);
my green horns are clearly poking through.....
I appreciate any help
..cheers.....
stevenrh
UPDATE: Thanks all for your help, and for being so cool to a noob, who could've RTFM (for a while).
I really appreciate it
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: open a socket and print from stdin....i think
by NetWallah (Canon) on Oct 05, 2004 at 18:50 UTC | |
Re: open a socket and print from stdin....i think
by ides (Deacon) on Oct 05, 2004 at 18:52 UTC | |
Re: open a socket and print from stdin....i think
by hsinclai (Deacon) on Oct 05, 2004 at 19:58 UTC | |
by rvosa (Curate) on Oct 05, 2004 at 21:58 UTC | |
by hsinclai (Deacon) on Oct 05, 2004 at 23:38 UTC | |
by rvosa (Curate) on Oct 06, 2004 at 07:13 UTC | |
by stevenrh (Beadle) on Oct 06, 2004 at 13:36 UTC | |
by hsinclai (Deacon) on Oct 06, 2004 at 13:53 UTC |