From the very first line of
perldoc -f exec
The "exec" function executes a system command and never returns -- use "system" instead of "exec" if you want it to return.
This would be something like system "some_system_command"; If you need to capture the output from the system command, use backticks: my @output = `system_command`;
You may also want to read about qx which can be found in perldoc perlop.
Edit: The first time I read this, I could have sworn you said your web script was in Perl and you were using exec(). So my note about perldoc -f exec isn't as applicable as I thought, given that your script is actually in PHP. But it's not bad advice, really, just not quite on the mark. *sigh* That's what I get for posting while trying to eat lunch.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.