I have the following hash:
%{$data{$id}{$date}}
that includes a large number of dates
and an array @dates that includes a subsection of dates found in the %hash.
What is the best way to loop through my %hash and delete all dates that are not found in @dates array? Once this is done I'd like the %hash to only have the values from @array dates.
I've tried 'delete unless exists' looking at keys after I created a hash from my @dates array but would get missing arguments error.
delete unless existsand the exact error message.