I am using the follwing code, but obviously it is processing the first file twice. Do you have any idea why it is doing that and what is wrong with my code?
foreach $file (@files){
open(IN, "$file") or die ("Cannot open file $file!\n");
$promnum = 0;
$stop = 0;
while ($stop == 0){
while (<IN>) {....