Perl script to run scripts sequentially

I got 10 script..ScriptA, ScriptB, Script C....I need to run them one after another.
First, I need to run ScriptA, then if and only if ScriptA is successfull, then I need to run ScriptB, and in a same way ScriptC...and on on. Could you please help to advice, can we do this using perl script.
Does anybody did this in your past, please let me know if you have such script or guide me how to write a one. basically I am looking for a job scheduling script.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I'd use a shell script, eg:
for script in scriptA scriptB scriptC scriptD
  /path/to/$script || exit $?

Open in new window


perl -e 'my @scripts = qw(ScriptA, ScriptB, ScriptC, ScriptD, $ScriptN);

  for my $script (@scripts) {
    system($script) or die($script . " Failed\n");

Open in new window

Similar as above, I would call scripts with "do" instead of a system command.

Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

CrazycruxAuthor Commented:
Hi TRW-Consulting,
Thanks, it helped. One last thing. after getting the output I need to compare the result with another output which is already in my system. I am able to compare the result but since few row order is different comparion is not correct.
Lets say output of my ScriptA has 100 rows and 10 column, I need compare this with another file which has similar data. Basically, i need to sort the file and then compare it.
Please help.
You have now added and changed your original question. Don't you think it appropriate to make that a new question?  And it would require additional information with sample data.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CrazycruxAuthor Commented:
Yes, you are correct. Thanks.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.