in reply to Array of Hashes

Now that friedo japhy has given you the answer you want, let me suggest that your "setOutputFiles" sub should be using "push" rather than referencing a global-scope array index variable (especially since, in the code you posted, it looks like you might forget to increment the global instance of $count). How about:
sub setOutputFiles { my ($captureId,$outputFile,$fileType) = @_; push @outputFiles, { $captureId => $outputFile, 'type' => $fileType }; print Dumper(\@outputFiles); }
Either that, or else you'll want to pass an array index value in the call to this sub (e.g. in case you want to assign different values to an existing array element).