in reply to Merging 2 Formatted Files

This can be done with something like this:
foreach (@first_file) { #get data from first file /\b(\w+)\b(.*)/; #split the first record, by name and data ($key, $data) = ($1, $2); #put thoose into scalars foreach (@second_file) { #next file foreach line in first file /\b(\w+)\b(.*)/; #run through same regex and get keys again if ($1 eq $key) { #compare keys from both files $merge{$1} = "$data$2"; #if they match, merge into hash } } }
It will merge thoose enteries that match, else it will discard the data. I'm kinda new to perl, so bear with me :o)