"Mr. W. A. Khushil Dep" wrote:

> I've got the below script saved on my server - but every time I use it I
> get an Internel Server Error! I've set the permission to 755 but still
> no
> luck. Any ideas folks?
>
> www.klconsulting.co.uk/cgi-bin/cssc.pl
>
> #!/usr/bin/perl
> use Net::Ping;
>
> @host_array =
> ("192.153.1.10","192.153.0.18","212.241.168.197","212.241.168.138","212.
> 241.167.11","194.153.21.68","194.153.20.100","194.153.20.51","194.153.20
> .52","194.153.20.53","515.35.226.5","212.241.160.12","194.153.1.19","194
> .153.1.18","212.35.224.125","212.35.224.126");
>
> $p = Net::Ping->new("icmp");
>
> $p->bind($my_addr);
>
> foreach $host (@host_array)
>     {
>        print "$host is ";
>        print "NOT " unless $p->ping($host, 2);
>        print "reachable.\n";
>        sleep(1);
>     }
>
> $p->close();

This looks like a script that might run by telnet [highly unlikely, since
the crowding of already dense strings and lack of formatting is likely to
cause logic or other human errors, but at least it might].  It sounds,
though, like you are trying to do this from CGI.  Unfortunately, you have
nothing in the script to support CGI communication.  Nor does your script
output html.  If you:
use CGI;
you will have tools available to do both very simply.

perldoc CGI

Joseph


-- 
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