Hi- I heard about the 'perl monks' and had no where else to turn to.
I have a whois script (from geektools) that takes a source ip and looks it
up into several database registries to get information. The original
script gets a standard input from the user but I need to give it
a specific ip address. When I do this (192.32.13.45) it gives me
192.3213.45. The spacing is off somewhere but I can't find where.
Can someone please help me! I need this script asap and I've been trying
several things for quite a while now.
The script is very long and I don 't want to post it here but
here is the part where it splits the ip. If anyone wants to really help, I can send
it to you personally via an attachment.
Thanks so much monks!
#######################################################
## Configuration
## Location of TLD/Whois server list.
my $RSList = "/export/home/manager/whois/whoislist";
## Default whois server (don't undef this)
$DefaultNic = "whois.networksolutions.com";
my $sip= 192.35.75.55;
#print "IP ADDRESS: $QueryIn ";
# my $QueryIn = <STDIN>;
my $QueryIn = $sip;
chomp $QueryIn;
if ($QueryIn eq "") {
&ShowResults();
exit 0;
}
my @QueryArray = split /\./, $QueryIn;
my $QueryElements = @QueryArray;
my $OrigQuery = $QueryIn;
$QueryIn =~ tr/A-Z/a-z/;
my @SuffixArray = split /\ /,$QueryIn;
my $SuffixElements= @SuffixArray - 1;
$SuffixArray[$SuffixElements] =~ tr/a-z.,0-9\-\+//cd;
$QueryIn =~ tr/a-z.,0-9\-\@\!\ \+\:\///cd;
Edit: chipmunk 2001-08-27
In reply to WHOIS help
by pmonk
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.