012323444, 4.5 Nuts & Bolts ,
234334323, Fuzzy Nut bunnies ,
434454554, Pineapple Pops ,
####
3423434444, 45554342365, 012323444, 00000333, description 2 update1, data1, data2
4342344, 46565fg66, 234334323, 00004454, update this, data4, data6
523444234, 466763fg4, 434454554, 00005565, this too update, data7, data8
####
#open file1, split each line delimited by comma and read into %hash
#assume $code, and $description are the key/value pairs of the %hash.
#open file2 and read into array
while {
my @array2 = ;
}
#close file2
#open file2
foreach $item (@array2) {
@values = split /,/;
$values[4] = $hash{$values[2]}; # this should now put the new description from the hash
print file2 $values[1], ", ", $values[2], ", ", $values[3], ", ", $values[4], ", ", $values[5], ", ", "\n";
# writing the line back into file2
}