Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: DNS Lookup

by toolic (Bishop)
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;

Replies are listed 'Best First'.
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.
Re^2: DNS Lookup
by jaldama (Acolyte) on Jan 19, 2012 at 20:05 UTC
    Ahh, life makes sense again.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://948838]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2016-12-06 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.