$db_name_list = '../data/data.db'; #name of other db file open (OTHER, "<$db_name_list") or &cgierr("error!"); #open file or return error if not able if ($db_use_flock) { flock(OTHER, 1); } #temporarily lock other file while () { #begin looping thru other file line by line next if /^$/; #skip blank lines next if /^#/; #skip comment lines(?) chomp; #remove line breaks @data = &split_decode($_); #use sub to convert break commands and delimiters if ($data[9] eq "$rec{'UserID'}") { #field position (starts with zero) to match $UCompany = $data[1]; #field position of data from line w/matching $UBranch= $data[2]; #field position of data from line w/matching } #may possibly want to add 'close (OTHER)' } #at end of this script - double check close syntax