in reply to Adding "if" statement to foreach causes only 1 run
You can store only a scalar in a hash value, so if you assign 'Completed' to $h->{Status}, the previous value of $h->{Status} is overwritten. To keep several statuses under one key, you have to use array reference, i.e. push @{ $h->{Status} }, 'Completed'.
|
|---|