in reply to (very silly) BOFH::Easy (instantiated in Net::Telnet)
Use Net::Telnet when there'll be terminal-like interaction with prompts and telnet protocol things. If it's just a socket, use the socket code!#!/usr/bin/perl use strict; use IO::Socket::INET; my $c = IO::Socket::INET->new("bofh.jive.org:666") or die "connect: $@ +"; while (<$c>) { next unless /Your excuse is: (.*)/; print ucfirst $1, "\n"; exit; }
-- Randal L. Schwartz, Perl hacker
|
|---|