因此,我尝试使用Perl从运行一些基本的Linux命令中捕获错误消息。例如,我尝试在运行ldd命令时捕获STDERR: # The stderr_file already existsmy $output= `$cmd`; 但是,即使ldd命令的输出确实包含诸如ldd: warning: you do not have execution permission for之类的错误消息,它也不会将它们打印到
shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directorylibmkl_intel_lp64.so => /g/software/intelXE/composer_xe_2011_sp1/mkl/lib/intel64/libmkl_intel_lp64lib64/libgcc_s.so.1