in reply to WHOIS help

Two initial suggestions that I would make are in the code fragment:
my $sip= 192.35.75.55; #print "IP ADDRESS: $QueryIn "; # my $QueryIn = <STDIN>; my $QueryIn = $sip; chomp $QueryIn;
I would put single quotes around your hard-coded ip address:
my &sip = '192.35.75.55';
This will force it to be a string, and hence later on when you are doing a string comparison (using Queryin eq ""), this should evaluate correctly.

Also, since you are not reading this value from SYSIN, you do not need the chomp line. Now, while this in itself will not be causing a problem, it is probably safer.

What does your sub ShowResults do?

Replies are listed 'Best First'.
Re: Re: WHOIS help
by pmonk (Novice) on Aug 27, 2001 at 22:07 UTC
    oh crap! It works!!! Damn- something so simple! Thanks so much!!! ShowResults does this:
    sub ShowResults { print "Query: $QueryIn\n"; print "Registry: $NicServ\n"; print "Results:\n"; if ($WhoisResults eq "") { $WhoisResults = "Null query, no data returned."; } print "$WhoisResults\n"; print "\n"; exit 0; }
    PMONK

    Edit kudra, 2001-08-28 Added code tags