in reply to Can't capture STDERR to Variable
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).
|
|---|