in reply to Generate HTML and open it in standard Browser (Windows)
The reason why the “open” strategy works is that, for this particular operating system, the .html file extension is understood as meaning that one should launch a web browser and pass that file to it. As far as I know, that browser is either going to have to have the address of a file, or a URL to go to. You can create a local web-server in Perl, opening it with a URL such as localhost::8080, say, but you will have to have (all of) that. Thus, perhaps in your case “saving it to a randomly-named file” and doing what you’re doing now is a pretty good choice. I’m just not sure that the alternatives, such as they are, would be in any way worth the bother in this case.