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

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: run system command continuously
by ww (Archbishop) on Sep 28, 2011 at 14:39 UTC
    Is that "Ms anyone" or "Mr. anyone" that you expect to provide a solution?

    In either case, I hope that individual can understand your question(s). I certainly can't.

    Please clarify... with, for example, comprehensible pseudo-code and a small sample of the content of index.ndx (properly formatted, as per Markup in the Monastery and the instructions around the text-entry box) inside <c>...</c> tags.

Re: run system command continuously
by kennethk (Abbot) on Sep 28, 2011 at 16:01 UTC
    As ww says, your post could use some clarity. However, I am guessing you have a system command g_mindist that requires a run time argument. You want to systematically execute this command for the integers between 0 and 100, inclusive. You could do this with IPC::Open2, but it's likely easier to just pipe a constant, perhaps like
    for my $i (0 .. 100) { system("echo $i | g_mindist -n index.ndx"); # And some code goes here to treat the output files }

    You then need to move the resulting files. This is easily accomplished with the File::Copy module.

    If this is off point, I apologize; please follow ww's advice as well as read I know what I mean. Why don't you? so we can understand your spec.