I just expected that that script contains all, and does not require additional scripts.
Not sure about this scripts:.

require 'CONFIG_ROOT/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";

I tried run script, get Internal Server error. Provider also checked script and say, that this error appears when the script is run:

root@web1 cgi-bin# sudo -u gareks ./ipinfo.cgi
Unterminated <> operator at ./ipinfo.cgi line 90.

here is full code:
#!/usr/bin/perl # # SmoothWall CGIs # # This code is distributed under the terms of the GPL # # (c) The SmoothWall Team # # (c) 2002 Josh Grubman - Multiple registry IP lookup code # # $Id: ipinfo.cgi,v 1.4.2.3 2005/02/22 22:21:56 gespinasse Exp $ # use IO::Socket; use strict; # enable only the following on debugging purpose #use warnings; #use CGI::Carp 'fatalsToBrowser'; require 'CONFIG_ROOT/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; my %cgiparams=(); &Header::showhttpheaders(); &Header::getcgihash(\%cgiparams); $ENV{'QUERY_STRING'} =~s/&//g; my @addrs = split(/ip=/,$ENV{'QUERY_STRING'}); my %whois_servers = ("RIPE"=>"whois.ripe.net","APNIC"=>"whois.apnic.ne +t","LACNIC"=>"whois.lacnic.net"); &Header::openpage($Lang::tr{'ip info'}, 1, ''); &Header::openbigbox('100%', 'left'); my @lines=(); my $extraquery=''; foreach my $addr (@addrs) { next if $addr eq ""; $extraquery=''; @lines=(); my $whoisname = "whois.arin.net"; my $iaddr = inet_aton($addr); my $hostname = gethostbyaddr($iaddr, AF_INET); if (!$hostname) { $hostname = $Lang::tr{'lookup failed'}; } my $sock = new IO::Socket::INET ( PeerAddr => $whoisname, PeerPort + => 43, Proto => 'tcp'); if ($sock) { print $sock "$addr\n"; while (<$sock>) { $extraquery = $1 if (/NetType: Allocated to (\S+)\s+/); push(@lines,$_); } close($sock); if ($extraquery) { undef (@lines); $whoisname = $whois_servers{$extraquery}; my $sock = new IO::Socket::INET ( PeerAddr => $whoisname, +PeerPort => 43, Proto => 'tcp'); if ($sock) { print $sock "$addr\n"; while (<$sock>) { push(@lines,$_); } } else { @lines = ( "$Lang::tr{'unable to contact'} $whoisname" + ); } } } else { @lines = ( "$Lang::tr{'unable to contact'} $whoisname" ); } &Header::openbox('100%', 'left', $addr . ' (' . $hostname . ') : ' +.$whoisname); print "\n"; foreach my $line (@lines) { print &Header::cleanhtml($line,"y"); } print "\n"; &Header::closebox(); } print < $Lang::tr{'back'} END ; &Header::closebigbox(); &Header::closepage();

In reply to Re^2: What modules required by Anonymous Monk
in thread What modules required by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.