I'm editing a perl code and I added subroutine to which I need to pass a hash.
%OrigResultHash = Parsing(\%OrigFileHash,\%OrigParamHash);
sub Parsing {
my (%fileHash,%paramHash)=(@ARG);
my %resultHash;
foreach my $file (keys %fileHash) {
my (@fileParam)=@{$fileHash{$file}};
my (@fileStates)=grep(/^state:/,@fileParam);
when running I get the error message:
Not an ARRAY reference at /vobs/cores/periph/blsp_prj/scripts/flow_result_parser_with_flag_orig.pl line 193. which is referring to:
foreach my $file (keys %fileHash) {
Can you explain what is wrong in the code?