theleftsock has asked for the wisdom of the Perl Monks concerning the following question:
Update: Just for some clarity, $aref_hrefs_inn is an array reference of hash references. I want to find a subset of that array, looking for one particular key->value pair of which there are multiple in the array reference. from there I want to loop through this subset to match other keys. I want to modify my large array reference of hash references in place by removing any rows that I found. My apologies if the codes isn't clear as code is sort of long, and I posted this example quickly. Ill try to come up with a functioning example easily.
thanks -theleftsock
@$search_array = grep{$_->{key_inn} eq $$out_href{key_search}} @$aref_ +hrefs_inn; foreach my $inn_href (@$search_array) { if (check_match($args_href) == 1) { if ($$flags_href{unique} == 1) { $inn_href = undef; } last; } } @$aref_hrefs_inn = grep {$_} @$aref_hrefs_inn;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grep return a set of references
by tobyink (Canon) on Jan 11, 2013 at 16:35 UTC | |
|
Re: grep return a set of references
by kennethk (Abbot) on Jan 11, 2013 at 16:37 UTC |