Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Backtick caught in infinite loop

by Anonymous Monk
on Jun 20, 2014 at 01:34 UTC ( #1090536=note: print w/replies, xml ) Need Help??

in reply to Backtick caught in infinite loop

Although it would certainly help, you don't have to post the original script - but you can whittle it down to a Short, Self Contained, Correct (Compilable), Example ( that reproduces the problem. Otherwise, we'll just be guessing.

the rest of my perl script does not run

How did you determine this? Have you tried printing something just after the backticks?

instead the command starts to run again

Unless the script is programmed to go back and attempt to run the command again (the backticks are inside a loop, sub, or after a label), or the script itself is being run again through some mechanism you haven't told us about, this seems really unlikely. Have you tried running the exact same command from the command line?

I was thinking about adding something like

Better to diagnose the problem instead of attempting solutions... Basic debugging checklist

Replies are listed 'Best First'.
Re^2: Backtick caught in infinite loop
by tau1777 (Initiate) on Jun 20, 2014 at 02:29 UTC

    Thank you for all the tips. I will try to come up with a short example code. In the meantime I can answer some of your questions.

    I have not tried printing something, so this simple check is on top of my list. The backticks are not inside any sort of loop structure. I am sure, but I will double check this matter. I have not run it from the command line, but I did have sucess running it inside of a system call. The only issue was the output form the system call was not captured, and so this caused other errors.

    Oh, thanks for the debug checklist, I've definitely got #1, now to start knocking away at the rest.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1090536]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2018-02-18 10:42 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (253 votes). Check out past polls.