Supressing shell error message within perl script
Hi all,
I'm a novice Perl scripter. I need to run a shell command from within my Perl script: Code:
$deletedev=`echo 1>/sys/block/sdz/device/delete`; Code:
sh: /sys/block/sdz/device/delete: No such file or directory |
This error comes from the error stream. You need to capture the output and error stream. There are multiple ways to capture the error stream of a sub-process, e.g. search by "perl external command" (among others).
EDIT: For example, this link. Hope that helps, Andi |
All times are GMT -5. The time now is 06:46 AM. |