in reply to run system command continuously

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.