in reply to Controlling the count in array

...If my last number of my counter(in this case is 4) minus the 5th column from File A is 1...

4-5 is not 1. Maybe you can try -1?

Replies are listed 'Best First'.
Re^2: Controlling the count in array
by EBK (Sexton) on Jun 08, 2018 at 01:17 UTC
    Sorry but is ($max - $counter) eq 1