#$userid already populated open(FILE,"FILE.txt") while() { if(/$userid/o) { chomp; #below is an example, there are actually 15 #variables coming out of this split. ($inv, $date, $amt)= split(/[|]/); #code to build hash. } } #processing of hashes