in reply to Re^2: Perl hashes: is there some way of adding more data to the value associated with an existing key?
in thread Perl hashes: is there some way of adding more data to the value associated with an existing key?

TMTOWTDI: I like to think of awk as baby perl - a really fast baby.
awk '{ seen[$1] = $2","seen[$1] ; } END { for (key in seen) { print key" "seen[key] ; } } ' /your/file.txt > /your/newfile.txt
  • Comment on Re^3: Perl hashes: is there some way of adding more data to the value associated with an existing key?
  • Download Code