Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: WHOIS help

by Maclir (Curate)
on Aug 27, 2001 at 20:47 UTC ( [id://108169]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://108169]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-03-29 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found