in reply to Re: how can I execute an html file from Perl
in thread how can I execute an html file from Perl

I am not stating my question adequately. I have constructed an HTML that consists of a number of inputs. Right now I am asking the user to enter the stated URL (in the browser) to display/execute this file. I would like to do this programactically.

  • Comment on Re^2: how can I execute an html file from Perl

Replies are listed 'Best First'.
Re^3: how can I execute an html file from Perl
by hippo (Archbishop) on Oct 27, 2017 at 16:18 UTC

    I think what you are now saying is that, given an absolute path on the filesystem, convert that to a URL and print it. In which case something like this (untested) should do:

    (my $url = $out_file) =~ s#$ENV{DOCUMENT_ROOT}#http://$ENV{SERVER_NAME +}#; print "Go to $url now for prizes!\n";
Re^3: how can I execute an html file from Perl
by marto (Cardinal) on Oct 27, 2017 at 18:05 UTC
Re^3: how can I execute an html file from Perl
by poj (Abbot) on Oct 27, 2017 at 16:49 UTC

    Why not use a link ?

    print "Content-Type: text/html\n\n"; print qq!<html> <body><h3>$out_file created.... <a href="/shhabcam/LOGS/user_$assignment.html">here</a></h3> </body></html>\n!;
    poj
      of course! Works great....thanks!