in reply to Please help...
As you can see from mifflin’s post, Perl actually makes this sort of thing quite easy.
You clearly want the computer to build a “list of” the items (second column of input data) that appear under “keys” (first column). Perl provides array (and list) data structures that allow you to easily manage “a list of zero-or-more things” and a hash data structure that lets you file things under arbitrary “keys.”
The magic that really brings all of this together is the idea of references. So, a hash can contain (for each key that it stores...) “a reference to” an array which contains all of the items belonging to that key.
One of the most important features of a language like Perl is that it gives you a well-chosen set of memory data structures, plus a “garbage-collector based” memory management system that lets you string together these complicated data structures (almost...) without worrying about it.