in reply to Hash of hash and array

If the data you've shown are the actual data in that file then I would suggest using split instead of regex to get the fields you want.

If not, then it would have helped a lot provide some real-world data that we can give you some good suggestions.

Please for your next posts use <p> </p> for your paragraph and <c> </c> for your code part