Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: DNS Lookup

by toolic (Chancellor)
on Jan 19, 2012 at 19:34 UTC ( #948838=note: print w/ replies, xml ) Need Help??


in reply to DNS Lookup

Change:
$userinput = $name;
to:
$name = $userinput;

I think you were missing the warning that I see because your shebang line is messed up (add a space before the -w), and you are probably bypassing it anyway by invoking your script with the perl executable on the command line. Also add:

use warnings;
use strict and warnings

The same goes for $userinput = $ip;


Comment on Re: DNS Lookup
Select or Download Code
Re^2: DNS Lookup
by jaldama (Acolyte) on Jan 19, 2012 at 20:05 UTC
    Ahh, life makes sense again.
Re^2: DNS Lookup
by JavaFan (Canon) on Jan 19, 2012 at 22:24 UTC
    you are probably bypassing it anyway by invoking your script with the perl executable on the command line.
    Perl actually honors command line switches on the she bang line, even when invoked directly:
    $ cat xxx #!/usr/bin/perl -w print undef; $ perl xxx Use of uninitialized value in print at xxx line 3.

      Yes, for the most part :)

      $ perl #!/usr/bin/perl -Mstrict -- Too late for "-Mstrict" option at - line 1.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2014-09-20 15:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls