Forum Moderators: coopster & phranque

Message Too Old, No Replies

Broken pipe

         

ToNyOmAn

2:05 am on Sep 7, 2004 (gmt 0)



Hi!

This is a perl script I'm working on. When I run it, it says Broken pipe.
"This is perl, v5.6.1 built for i386-linux"
Any idea why?


#!/usr/bin/perl -w
use strict;
use Socket qw(:DEFAULT :crlf);

### Settings
my $username = "ToNyOmAn";
my $password = "lofasz";
##############################

## Connect...
my $proto = getprotobyname('tcp');
socket(SOCK, PF_INET, SOCK_STREAM, $proto);
my $iaddr = gethostbyname('ircstatus.irchelp.hu');
my $port = getservbyname('http', 'tcp');
my $paddr = sockaddr_in($port, $iaddr);
connect(SOCK, $paddr);

## Send crap
print SOCK "GET /?username=$username&password=$password HTTP/1.1$CRLF";
print SOCK "User-Agent: iRC status updater v0.1$CRLF";
print SOCK "Host: ircstatus.irchelp.hu$CRLF";
print SOCK "Connection: close$CRLF";

VectorJ

7:59 pm on Sep 10, 2004 (gmt 0)

10+ Year Member



I'm not getting any error when I run the script (freebsd, perl 5.6.1)