On Fri, Aug 24, 2012 at 06:02:39PM +0100, Mik J wrote: > Hello, > > I have the following perl script that works in command line: > > [...] > > # ./dns.pl > 142.244.12.42 > > [...] > > I tried in /var/www/htdocs/cgi/ but when I access > http://192.168.1.1/cgi/dns.pl > I have a blank page > > In theory when Apache is > started it loads Net::DNS so that dns.pl can use it. > > I don't think I'm far > from the solution but I'm stuck here. Does anyone have an idea how can I make > it work ? >
Hi, Just a question, the cgi script is the *same* that the command line script ? If yes, you should first print HTTP headers before the content. Try: print "Content-Type: text/plain"; print ""; at the start of your script. The command line should echo: $ ./dns.pl Content-Type: text/plain 142.244.12.42 $ -- Sébastien Marie

