Do read perldoc perlintro in particular (for this case, read all of it and learn the language) the "Perl variable types" section which introduces the concept of hashes.
Now to the meat of your question, what is it you need to do
open a file perldoc -f open
Read each line in the file perldoc perlintro "Conditional and looping constructs", there's also an example of this in the documentation on open
Split the line into identifier and value perldoc -f split
Add the retrieved number to your identifier's value in the hash, should be a doddle after reading the perlintro document.
Welcome to the monastery and hope you enjoy the learning experience ;)