foreach $keyword ( @ARGV ) { $key= join(' ', split(/\+/, $keyword)); $remote = IO::Socket::INET->new( Proto => "tcp", PeerAddr => $host, PeerPort => $port, ); unless ($remote) { die "cannot connect to http daemon on $host on $port" } $remote->autoflush(1); print $remote "GET $prefix$keyword HTTP/1.0" . $BLANK; $count="0"; while ( <$remote> ) { if (/flist/i) { $count++; } } print "$key,$count\n"; close $remote; }