in reply to Match Line And Combine Into One Line

split on commas; make a key from the H-string and the second number (presumably a date); add text to the hash value for that key (include a space before the added text if there's already text in the key). If you want to keep the same order as the first match of a given key, you'll need to keep the keys in an array as well. Once done, loop thru the keys and output.

If you can guarantee that they keys will always stay together, you can change the logic to not need a second loop, and just output the value of the old key once the key has changed; don't even need a hash in that version, just a $k and $txt