in reply to Adding "if" statement to foreach causes only 1 run

I do not get it. What do you think you have in $lacts->{$act}->{Status}? You can use Data::Dumper to see.

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'.