http://www.perlmonks.org?node_id=178841

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Oh my Brothers and Sisters I am trying to call a perl script from within a perl (CGI) script using backticks. This call is being made within a while loop. To this novices frustration only the first call is being executed. The script runs happily to its end without error, but the external script is executed only once and not the multiple times I had hoped for. Can anyone help me here???

Replies are listed 'Best First'.
Re: backtick calls in loops
by ariels (Curate) on Jul 02, 2002 at 13:47 UTC
    You might wish to read about how (not) to ask a question.

    It's impossible for anyone to help you, for the simple reason that you're not giving your nonworking code. The following should help you post an answerable question. It might even let you ask more precisely, or find the problem yourself!

    Try to write a short while loop which "calls a perl script using backticks". Does it work? Is it executed just once, or several times? If it's executed just the one time, try replacing the perl script call with a print statement. Does that execute just once? Is your loop executing more than once?

    Try to find short, nonworking code, and post that. Then we might be able to help you.

Re: backtick calls in loops
by Zaxo (Archbishop) on Jul 02, 2002 at 13:43 UTC

    Yes, but we'll have to see the loop first.

    After Compline,
    Zaxo