in reply to Re^2: handling files using regular expression
in thread handling files using regular expression

while (<FILE>){ ... something ... } while (<FILE>) { ... something else ... }

That second loop will never execute. Can you tell why?