IPC::Run or IPC::Open3 allow you to capture STDERR of external commands.
I hope that your use of ls is only an example - directory listings are easily obtained in Perl with opendir, readdir and closedir, which make errors readily available in $!. (Or File::Find if you want recursive directory listings).
In reply to Re: Can't capture STDERR to Variable
by moritz
in thread Can't capture STDERR to Variable
by Skeeve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |