in reply to How do I print output to STDOUT instead of to an HTML file?
The quickest thing for you to do is to comment out the opening of the file and closing, ie: these lines
Place a # mark in front of it. and instead of print HTMLFILE "$HTML\n"; just say print "$HTML\n";, or if you want to be explicit about it, replace HTMLFILE with STDOUT in the print statement. So,open(HTMLFILE,">pingresults.html") || die "Couldn't open pingresults"; close (HTMLFILE);
becomesopen(HTMLFILE, ">pingresults.html") || die "Couldn't open pingresults\ +n"; print HTMLFILE "$HTML\n"; close (HTMLFILE);
# open(HTMLFILE, ">pingresults.html") || die "Couldn't open pingresult +s\n"; print STDOUT "$HTML\n"; # close (HTMLFILE);
|
|---|