sub main { print "Content-type: text/html\n\n"; print " \n"; ....(omitted since this part works if real output print "\n"; open("runmain","$commands{$PROGRAM} $TARGET_HOST |"); while () { chomp $_; print "$_\n"; } print " \n"; close ("runmain"); #### "aussiebb.com.au: No address associated with hostname Cannot handle "host" cmdline arg `aussiebb.com.au' on position 1 (argc 2) ####
Content-type: text/html

....