perl -e \'system (\"crontab1 -l\");print $?\'
returns -1 as expected (program crontab1 doesn\'t exist)
perl -e \'system (\"crontab1 -l|
If you want to check the status, don't put them all in the same system. Open a reading pipe to the first program to get its output then open another pipe to the other program.