in reply to Generate HTML and open it in standard Browser (Windows)
In theory you might be able to use data URIs (e.g. data:text/html,<h1>Hello World</h1>), but I've found temporary files to be much more robust. In that respect, File::Temp is probably the best way to go, you might find its UNLINK option helpful (unless the browser is supposed to persist after the Perl script terminates).
Starting a local webserver might be another option, but depending on your application it might be a little overkill. But take a look at HTTP::Server::Simple and Mojolicious::Lite anyway.
|
|---|