If you are still receiving output on the screen when you run $x = `$cmd` it may be the output from STDERR that you are seeing.
If you want to snag both STDOUT and STDERR and treat them separately, you should look at something like IPC::Run, which you give you sufficient control over the process being run to do such a thing.
• another intruder with the mooring in the heart of the Perl
In reply to Re: getting the output of command in variable
by grinder
in thread getting the output of command in variable
by phemal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |