PerlRob has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use strict; use CGI qw/:standard/; use CGI::Carp 'fatalsToBrowser'; my $module = param('module'); my $result; checkForModule(); showPage(); sub checkForModule { $result = `/usr/bin/perl -M$module -e 1`; } sub showPage { print header, start_html({-onload => "document.moduleForm.module.focus()", title + => "Module Checker"}), qq( <br /><br /> $result $module <br /><br /> <form method="post" action="have.pl" name="moduleForm"> <input type="text" name="module" id="module" maxlength="50"> <input type="submit" value="Check for Module" name="submitButt +on" id="submitButton"> </form> ), end_html(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Calling perl from CGI
by lamp (Chaplain) on Sep 07, 2008 at 05:40 UTC | |
by PerlRob (Sexton) on Sep 07, 2008 at 06:04 UTC | |
|
Re: Calling perl from CGI
by betterworld (Curate) on Sep 07, 2008 at 09:29 UTC | |
|
Re: Calling perl from CGI
by Narveson (Chaplain) on Sep 07, 2008 at 03:44 UTC | |
by PerlRob (Sexton) on Sep 07, 2008 at 04:07 UTC | |
by Narveson (Chaplain) on Sep 07, 2008 at 05:34 UTC | |
by Anonymous Monk on Sep 07, 2008 at 07:55 UTC | |
by Anonymous Monk on Sep 07, 2008 at 06:20 UTC | |
by Anonymous Monk on Sep 07, 2008 at 05:28 UTC | |
by Anonymous Monk on Sep 07, 2008 at 05:22 UTC | |
|
Re: Calling perl from CGI
by trwww (Priest) on Sep 08, 2008 at 00:11 UTC |