... # some code print "Importing $FILE.\n"; $rtncd = system("mysql < $FILE") >> 8; # shift right 8 bits to recover actual code if($rtncd == 0){ ... # everything OK }else{ ... # some problem ? } print "Sleeping for 5.\n"; system('sleep 5'); ... #more coce