update fixed wrong syntax...thanks ikegami
system "perl -w crrep.pl",$file;
Off topic from your original question but I hope a point that will be instructive: I believe that your updating algorithm is flawed. So what happens if your program were to crash before all @lines were finished?
You can't fix the error and re-run the program because at this point the original data is gone! It is better to open new file handle to $out or OUT, and send output there. When all processing is complete, delete the input file, rename the OUT file to the original file's name. Try to set up scenarios where you can just "rerun the program again" if it didn't work and minimize windows where recovery is difficult or impossible. Note that there are many ways that a program can crash that aren't your program errors (like windows restart, power fail, etc).
In reply to Re: run another perl script in perl
by Marshall
in thread run another perl script in perl
by satzbu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |