If you want something a little more robust, that avoids the overhead of using the shell, consider capturex() from IPC::System::Simple.
It is indeed much more robust and a good suggestion! Just a small nitpick: on Windows it is almost impossible to avoid the shell*. IPC::System::Simple works around this by using Win32::ShellQuote under the hood.
* Update: See my clarification further down in the thread.
In reply to Re^2: use of Backticks to catch console output
by haukex
in thread use of Backticks to catch console output
by Takamoto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |