Hello Dear Monks
I am usin a hash reference in my program but I made a mistake. Could you check ? Thanks. I just wrote the parts where the problem lies. I have not written what has been tested.
I have updated the code with bits I found important to write
sub flow_count{ my $HASH_OF_FLOW; my $view = $_[0]; # FTFM or CTFM ... ... foreach my $file(@FILES_IN_THE_FOLDER){ my $key = "$reg;$date"; # M2 is a number which has been computed $HASH_OF_FLOW->{'$key'} = 'M2'; } return $HASH_OF_FLOW; } my $FTFM_HASH_OF_FLOW = flow_count("FTFM"); my $CTFM_HASH_OF_FLOW = flow_count("CTFM"); my @FTFM_KEYS = keys %$FTFM_HASH_OF_FLOW; foreach my $key(@FTFM_KEYS){ my $FTFM_CTFM_diff = $FTFM_HASH_OF_FLOW{$key} - $CTFM_HASH_OF_FLOW +{$key}; print $OUTFILE "$key;$FTFM_HASH_OF_FLOW{$key};$CTFM_HASH_OF_FLOW{$ +key};$FTFM_CTFM_diff\n"; }
In reply to reference of hash by steph_bow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |