But again, fail:#!/usr/bin/perl -w use strict; use Net::DNS; my $dns = new Net::DNS::Resolver; my $domain; if($domain ne "") { 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"; } } else { print "content-type:text/html; charset=utf-8\n\n"; print "<form action=\"dnsdig.cgi\" method=\"post\"> <input name=\"domain\" type=\"text\" value=\"\" /> <input type=\"submit\" value=\"Get MX\" /> </form>"; }
Now I'll use your newest recommendation (which I know will work), but doesn't provide the empty form field I'm looking for -- but I'll do it anyway. :)Use of uninitialized value $domain in string ne at dnsdig.cgi line 9. Use of uninitialized value $domain in string ne at dnsdig.cgi line 9., + referer: ...
#!/usr/bin/perl -Tw use perl::always; my $perl_version = "5.12.4"; print $perl_version;
In reply to Re^6: How to convert an @ARGV to form based input?
by taint
in thread How to convert an @ARGV to form based input?
by taint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |