in reply to display html file from Perl

Well not really a Perl question ...

... you have to tell a browser to open the file.

Like firefox PATH/c1.html

not sure if Firefox still supports the -remote flag.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

Replies are listed 'Best First'.
Re^2: display html file from Perl
by Anonymous Monk on Jul 10, 2017 at 14:09 UTC
    use strict; use warnings; system("perl ./c1.pl > ./c1.html"); system("/usr/bin/firefox http://localhost:8080/ ./c1.html");

    This constructs the HTML file but Firefox returns:

    Error: GDK_BACKEND does not match available displays
      This  http://localhost:8080/ ./c1.html looks suspicious. At least the space, and did you really configure your local webserver to know the current working directory of your Perl script?

      I normally use the file:// protocol (+ absolute path) for simpler HTML pages (your title says "file" not application)

      If this doesn't help, fix your Firefox.

      edit

      To be clear this is NOT a Perl problem. Find a solution from the command line.

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!