in reply to hash problem

I'm not good at English and I hope I clearly explained my problem to you.

I'm afraid you did not. You neither provided samples of the input and output files, nor did you tell us how the current output differs from the expected output.

You also didn't tell us what you have tried, and how you failed. We can help you learning and understanding Perl, but we won't solve problems for you for free.

Perl 6 - links to (nearly) everything that is Perl 6.