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.
In reply to Re: Play golf on an array of hashrefs
by Joost
in thread Play golf on an array of hashrefs
by very empty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |