I'm looking for a snippet or simple module that run an external command and capture the completion status and stdout. I found some partial snippets in the camel book, but I'd really prefer something a bit more tested/complete. This is my note to dive into CPAN. Any suggestions are appreciated.
-james.
A string enclosed by backticks (grave accents) first undergoes double-quote interpolation. It is then interpreted as an external command, and the output of that command is the value of the backtick string, like in a shell. In scalar context, a single string consisting of all output is returned. In list context, a list of values is returned, one per line of output. (You can set $/ to use a different line terminator.) The command is executed each time the pseudo-literal is evaluated. The status value of the command is returned in $? (see perlvar for the interpretation of $? ).
Re:Backticks
Ron Savage on 2006-02-13T05:36:14
IPC::Run3Re:Backticks
Alias on 2006-02-13T12:34:02
What he said