title: How to use perl script to monitor whether a process is finished?
body: <p>I use    system "xxxxx"    in perl to execute some command in linux.
  I have a batch of commands to execute so that I need to know when the last command is finished that I can send out the next one.
  I don't want to use sleep(**) because I have no idea how long each command will executed.
  Is there a way that I can monitor the when the command is finished?
  Thanks a lot.</p>