mda, se pare ca nu am citit eu bine pe acolo.
oricum deja e prea pompos pt ce am eu nevoie, ci mai degraba:
my $proto = getprotobyname('tcp');
$socket = IO::Socket::INET->new(PeerAddr => $machine,
PeerPort => $port,
Proto => $proto);
if ($socket) { print "Server ",$machine," port ",$port," active"; }
10x vang,mituc :)
On Sun, Jun 17, 2001 at 02:17:24PM +0300, Viorel Anghel wrote:
>
> On Sun, Jun 17, 2001 at 05:19:50PM +0300, Stefan Laudat wrote:
> >
> > fie secventa:
> > my $t = Net::Telnet->new(Host=>$ipaddr,Port=>$port,Timeout => 3);
> > if( !$t ) { print "Eroare port $port service $service on $host\n";
> >
> > din pacate, totul se termina in die() cu urmatorul mesaj:
> > problem connecting to "1.2.3.4", port 1: Connection refused at ./check.pl line 339
>
> man Net::telnet
>
> Errors such as timing-out are handled according to the errmode action. The
> default action is to print an error message to standard error and have the
> program die. Use errmode()' to change the action.
>
>
> --
> ___
> <o-o> Viorel ANGHEL <vang AT altavista DOT net>
> [`-']
> -"-"- In Linux We Trust.
> ---
> Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
> unsubscribe from this list.
>
--
Stefan Laudat
CCNA & CCAI
-------------
"Blessed are the meek, for they shall
inherit the Earth". The rest of us, the Universe.
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.