in reply to Re^2: How to access the hash array values?
in thread How to access the hash array values?

When I run the code it dies with this error message:

Use of uninitialized value $filename in hash element at 902239.pl line 29.

$filename loses the value assigned to it at the end of the previous foreach block. Try putting in some print statements and use data::dumper to verify the contents of the array after the loop that assigns to it.