你在调用perl命令的后面判断一下$?if [ $? = 0 ]then echo “success”fi
可以根据重定向到文件,再判断文件里的内容,如下:system("dir >dir.out") && die "cannot create right_now";open FILE ,"dir.out";while(){print $_;}
很简单啊。。。STAT=$(perlscript.pl)
你可以看一下perl关于管道的内容。