hmb104 has asked for the wisdom of the Perl Monks concerning the following question:
Dear Perl monks,
I have a Perl script that I use to extract some info from my webserver. The script works great on the command line. It takes a username as an argument and it returns few lines of output such as below:
./whois.pl hmb104 #======================================================== # info for [hmb104] # Time: Sun Sep 2 18:18:38 CDT 2012 #======================================================== ID: hmb104 home: /home/usr/hmb104 ---------------------------------------------------------- usage: 45.2 Dynamic: 33 ---------------------------------------------------------- End of report
The script returns print() statements with some variables. I would like to know how to make the script print the output to a webpage. I have tried to exec() the script in PHP but for userid problems it didn't work. How I can make the script redirect output to html document?
The script is located in "server1" and the webserver is "server2". I created a PGP key so I can execute the script from server2 without any problem.
I appreciate the input
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Simple Perl print() output redirect to html/webpage.
by bitingduck (Deacon) on Sep 03, 2012 at 06:29 UTC | |
by hmb104 (Sexton) on Sep 03, 2012 at 06:48 UTC | |
by Anonymous Monk on Sep 03, 2012 at 07:12 UTC | |
by Anonymous Monk on Sep 03, 2012 at 07:24 UTC | |
by bitingduck (Deacon) on Sep 03, 2012 at 15:17 UTC | |
|
Re: Simple Perl print() output redirect to html/webpage.
by aitap (Curate) on Sep 03, 2012 at 07:59 UTC | |
by hmb104 (Sexton) on Sep 03, 2012 at 17:48 UTC | |
by aitap (Curate) on Sep 03, 2012 at 18:11 UTC |