It looks suspiciously like you have a scoping issue with
@List. What is probably happening is that you have (either explicitly or implicitly) created a *global* variable called
@List, rather than a local variable within each subroutine. I would suggest adding
my @List; to the beginning of your
TSM_Enquire and
Process_Columns subs, which will give them each a private copy of the list that is empty each time the sub is first executed. For more details, you can check out the sections on scoping in
perldoc perlsub.
Also, you might also want to use strict; at the beginning of your program to help catch errors like this in the future.
If that doesn't solve the problem, it might be worth trying some simple debugging tricks, like adding warn statements on subroutine entry and exit and when you are manipulating @List or other variables that are central to what your code is trying to accomplish.