How to call a another program and die in Perl?

tim85a

New member
I've got a program that I'm wighting in Perl that I would like to call program2.pl and die if something happens. I've got the line of code:

die {exec "program2.pl"};

will that make my first program die? I know it calls program2.pl, but I don't want program1 to keep going. I read some where that the exec bit pauses the program and calls whatever program you want.
 
Back
Top