November 8th, 2013, 05:30 AM
Open a HTML page from inside perl code
Hello to all,
I'm a beginner in Perl programming.
I'm trying from inside a .pl file (perl file), to open an html pop-up page saying a thing like "Hello World!". Like the pop-up that some times appear in internet pages.
Can someone help me in this.
November 8th, 2013, 08:49 AM
Presumably you mean in a web server script, that if someone goes to your page the perl script will create a popup window on the user's browser.
November 10th, 2013, 05:00 AM
You can also try the CGI module that comes with your perl like thus:
use CGI qw(:standard);
my $html = CGI->new();
print $html->start_html(-title=>'home Page',
-src => './pop_up.js',
Though CGI module is old, and there was a discussion to remove it totally from perl default installed modules. I can tell if that has been done. But Perl version 5.16.1 still has it.
Do perldoc CGI from your Command Line Interface (CLI) to read CGI documentation.