in reply to Play golf on an array of hashrefs
Update: this also checks for existence of the key, if you don't need to, go for Abigail's solution.@array = map { exists $_->{mykey} ? $_->{mykey} : () } @array;
-- Joost downtime n. The period during which a system is error-free and immune from user input.
|
|---|