in reply to Re: (2) Waiting for an SQL script to finish
in thread Waiting for an SQL script to finish

I put backticks just to show another way to do it.

You shouldn't have done that; it's bad advice. Backticks make Perl collect the output of programs run (which then gets discarded because you aren't doing anything with it). Furthermore, you aren't checking for any failures, just like with system, it's a good thing to test the value of $? after using backticks.

In short, while you could use backticks instead of system, in most cases either system is the right approach, or backticks. There might be a rare case where both are correct, but I can't think of any.

Abigail

  • Comment on Re: Waiting for an SQL script to finish

Replies are listed 'Best First'.
Re: (2) Waiting for an SQL script to finish
by monktim (Friar) on Aug 26, 2003 at 21:07 UTC
    I agree. I just wanted to show TMTOWTDI :)