here, eval is not catching the script error when $fullpath is failed.Either i have to check the pattern $fullpath before executing a shell script or capture the error after executing the command. How can i do this? - kullsmy $fullpath="/tmp/dir*"; eval { @size=split("\n",`du -sk $fullpath | cut -f1`); }; $sum=0 if($@);
In reply to Capturing shell command error by kulls
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |