system call exits the loop

B

Bob Helber

I've got a perl script with a system command, within a for loop, that
calls a FORTRAN program. For one of the iterations of the for loop the
FORTRAN program quits with an error due to bad input. This then exits
the for loop and does not continue the loop, which I would like it to
do, even if the FORTRAN program crashes. How can I "catch" this error
and continue the loop. Do I have to fix the FORTRAN program to exit
more cleanly?

Thanks for any help.
 
B

Bob Helber

Disregard this post, the system call fail does not exit the for loop.
My bad. I was also hung up on the fact that system outputs a 0 for a
failed process.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top