in reply to Re: Hash filter one-liner not working as expected
in thread Hash filter one-liner not working as expected
You had syntax for something else. If number of hash elements was odd, Perl would have warned you sooner than you loose 25 minutes, it was simply bad fortune. Btw, it could be:
my %colors = %$hash{ grep /color$/, keys %$hash };
with use 5.020; to warn would-be users.
|
|---|