# build hash while() { ... $hshFoo{$key1}{$key2} = $strFileName; ... # key1 is a number # key2 is a sequential number }