What a pack of asses you are. When someone asks a serious
question, you are silent as snow for days, but someone asks a very
simple one and you bray like donkeys with glee at your great
opportunity to be abusive.
In any event, the reference you gave didn't even answer the
question, so you are fools as well. The correct answer would have
been:
$string = `someprogram @args`;
If YOU all had read your own reference closely, you would have
noticed that the system function returns the error code, not what
goes to STDOUT.
Actually they did give you the correct answer, and what is better, a
technique you can use to find information for yourself (i.e.; read
the docs). They told you to read the docs for system(), which you
were already using. The third paragraph in the documentation for
system() says:
[system()] is *not* what you want
to use to capture the output from a command, for that you should
use merely backticks or "qx//", as described in "`STRING`" in
perlop.
Jürgen Exner explicitly pointed to this paragraph.
Not understanding the documentation and asking for clarification is
understandable. So is asking for a pointer to the proper place in
the admittedly voluminous Perl docs. Telling people they are
"fools" and "asses" for pointing you to the answer to your question
is completely different.