in reply to Re^3: How to convert an @ARGV to form based input?
in thread How to convert an @ARGV to form based input?
Use of uninitialized value $domain in string ne at dnsdig.cgi line 9. Use of uninitialized value $domain in concatenation (.) or string at d +nsdig.cgi line 18. Can't call method "answer" on an undefined value at dnsdig.cgi line 19 +.
#!/usr/bin/perl -w use strict; use Net::DNS; my $dns = new Net::DNS::Resolver; my $domain; if($domain ne "") { print "<form action=\"dnsdig.cgi\" method=\"post\"> <input name=\"domain\" type=\"text\" value=\"\" /> <input type=\"submit\" value=\"Get MX\" /> </form>"; } else { my $mx = $dns->query( $domain, 'MX' ); print "content-type:text/html; charset=utf-8\n\n"; print "$domain:\n\n"; foreach my $rr ($mx->answer) { print "<br />", $rr->exchange, ' [<b>', $rr->preference, "</b> +]\n"; } }
#!/usr/bin/perl -Tw use perl::always; my $perl_version = "5.12.4"; print $perl_version;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to convert an @ARGV to form based input?
by grizzley (Chaplain) on Aug 21, 2012 at 08:04 UTC | |
by taint (Chaplain) on Aug 21, 2012 at 08:18 UTC | |
by taint (Chaplain) on Aug 21, 2012 at 08:28 UTC | |
|
Re^5: How to convert an @ARGV to form based input?
by taint (Chaplain) on Aug 21, 2012 at 08:03 UTC |