Hello Monks
I have created a Perl script which runs fine manually with a value parsed during runtime, i.e. like 'perl myscript.pl value'
I need to execute this over a Web Server (IBM HTTP Server), I have configured it correctly and it is able to execute the Hello_World.pl program to display Hello World with a name given as input in the URL. like https://hostname.com/cgi-bin/Hello_World.pl?name=test
But my actual code which calls for a different Perl script from this, does not work.
#!/usr/bin/perl use strict; use CGI; use IPC::System::Simple qw(system capture); #create CGI query object to get the SSO from URL my $sso = new CGI; my $sso = $query->param( "sso" ); #*********Script within a script both files in same path********** system( "perl myscript.pl $sso" ); print "Content-type:text/html\r\n\r\n"; print "<html>"; print "<head>"; print "<title>Some Header</title>"; print "</head>"; print "<body>"; print "<h2>You have entered $sso</h2>"; print "</body>"; print "</html>";
This is not working as it is not detecting IPC::System::Simple qw(system capture) from this script. How could I make the CGI parse the $sso to myscript.pl ?
Thanks in advance....
In reply to Use CGI to run a Perl script via web server by suvajit123
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |