Now that I have CGI working with apache on my server, I am experimenting.
Anyhow, I wrote the following script and was wondering how to capture the
output of a system call. I am trying to capture the output so that I can
format it for the browser.
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
print header(), start_html("Online Manpage Accessor"), h1("Online Manpage
Accessor");
if (param()) {
my $manpage = param("manpage");
my @output = system("man $manpage"); #trying to capture,
#but it goes to the browser
} else {
print hr, start_form;
print p("Enter manpage: ", textfield("manpage"));
print p(submit("lookup"), reset("clear"));
print end_form, hr;
}
print end_html();
Thanks,
Patrick
- Re: I am a real begginer to perl...... M.W. Koskamp
- Re: I am a real begginer to perl...... Paul
- Re: I am a real begginer to perl...... Me
- Re: I am a real begginer to perl...... David Monarres
- Re: I am a real begginer to perl...... Casey West
- Re: I am a real begginer to perl...... Walnut
- RE: I am a real begginer to perl...... ODoisnea
- Re: I am a real begginer to perl...... M.W. Koskamp
- RE: I am a real begginer to perl...... Paul
- Re: I am a real begginer to perl...... Me
- Re: system call question J. Patrick Lanigan
- Re: system call question Mike Lacey
- Re: system call question Paul
- Re: system call question Mike Lacey
- RE: system call question J. Patrick Lanigan
- clean up man output (was Re: ... Me
- Re: system call question Casey West
- Re: system call question Paul
- RE: system call question J. Patrick Lanigan
- Re: system call question Kevin Meltzer
- RE: system call question J. Patrick Lanigan
