I would like to use Perl to delete keys from a hash map that match values in a given array.
Example:
Input:
@array = ("apple", "banana" , "cherry")
%hash = ( '/abc/apple/somestring' => val1,
'/banana/somestring/somesting' => val2,
'/xyz/apple/somestring' => val3,
'/somestring/somestring/' => val4,
'/xyz/somestring/random' => val2,
)
Output:
%hash = ( '/somestring/somestring/' => val4,
'/xyz/somesting/random' => val2,
)