in reply to read CSV file line by line and create hash table

Personally, unless it's a 'how do I do that' sort of a question and having realised/learned that CPAN truly _is_ my friend - I'd use Text::CSV ...

Hmmm, very many thanx to choroba for pointing out what I self-evidently failed to spot - that the OP already uses it - doh!!

A user level that continues to overstate my experience :-))