execute another script and wait for it to finish

Posted on 2000-02-18
Last Modified: 2010-03-05
Ive tried to use the
use shell;

this executes the but ends the original script So the original does not finish running it cuts it off about in the middle every thing is kinda half done any ideas
Question by:Spearmon
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 19

Expert Comment

by:Kim Ryan
ID: 2537503
shell is used to run Unix shell commands transparently within perl. I am not sure why you would want to use it to execute one perl script from within another. You could say

# your first perl script
require "";
....some code

and create subroutines called main etc. inside Either that or make a module.

Author Comment

ID: 2537731
Im trying to avoid waiting for the script that im calling to finish before the main script completes the second script is indexing about a thousand meta tags and takes about 10 minutes to run

Author Comment

ID: 2537732
sorry about the title i ment to say and not wait for it to finish

Accepted Solution

amitpagarwal earned 150 total points
ID: 2537937

try the following
system ("/usr/local/bin/perl -w") ;
LVL 84

Expert Comment

ID: 2538849
If you want the other script to run at the same time as your main script, you might say
  system" &";
see also, fork/exec

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (,  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question