Werner Otto wrote:

Keep the discussion on the list please.

> Bob Showalter wrote:
> > ...
> > What platform and what version of Perl and IO::Socket? If I fix the
> > missing comma, it times out properly for me with Perl 5.6.1 on
> > FreeBSD 4.10 
> > 
> SunOS 5.8  This is perl, v5.8.0 built for sun4-solaris-thread-multi -
> I think
> 
> Sorry the full code:
> 
> #!/usr/bin/perl
> use IO::Socket;
> 
> my $host=shift @ARGV or die 'need hostname';
> my $port=shift @ARGV or die 'need port number';
> my $timeout=1;
> my $socket=IO::Socket::INET->new(PeerAddr=> $host,
>         PeerPort => $port,
>         Proto => 'tcp',
>         Type => SOCK_STREAM
>         Timeout => defined($timeout)?$timeout:10) or die "Can't talk
> to $host at $port";

That code is still missing a comma and won't compile. Sorry I don't
understand why it isn't timing out on your system.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to