in reply to Better Way to Search Large File.

Off-topic... arrays, hashes and subroutines are Good Things when you see repeated code.

An array that maps $exact_breakdown subscripts to $ans2 regex would reduce the size of your code greatly. A subroutine that returns $employee_name would make your code more readable, etc.