in reply to Obtaining the output of a system call, not the return status
Backticks or qx will do that:
my $html = qx(echo $plaintext | txt2html --extract);
Update: (remove foot from mouth) ++japhy is correct. In detail: echo would be ok (it's a shell builtin), but $plaintext = quotemeta $plaintext; needs to be said first. The absolute path to txt2html should be used. If $plaintext comes from a file, input redirection to txt2html would be better than reading it first and echoing.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Obtaining the output of a system call, not the return status
by japhy (Canon) on Feb 09, 2002 at 22:03 UTC |