in reply to Re: Add new data to array
in thread Add new data to array
It's possible to further simplify this (slightly) by removing the intermediate array variable:
my ($add_in) = grep { $_->{status} eq 'houses' } @$data;
(And I think it should be noted that the // defined-or operator was added with Perl version 5.10.)
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Add new data to array
by BillKSmith (Monsignor) on Mar 14, 2020 at 18:36 UTC | |
by kcott (Archbishop) on Mar 14, 2020 at 22:00 UTC |