http://www.perlmonks.org?node_id=1218982

dideod.yang has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks. I need your idea to achieve my script.. I understand difference between exec and system. LOCAL is my local command in my linux. My goal is when LOCAL command fail, then script try again command. How can I do that? below script, each case has limit point.. Please help me.
#LOCAL: local command #case 1 # when LOCAL failed script die exec "LOCAL"; print "success"; #case 2 #when LOCAL failed but print suceess system "LOCAL"; print "success";