in reply to Wrestling with HoL
Having said this, your code can be cleaned up using grep.
To do groups and fields in one sweep:@$row_data{groups} = grep{ $_->{whatever} == $foo } @$row_data{groups} + ;
Which assigns the new arrays belonging to groups, fields with the filtered original arrays.for( qw/groups fields/ ){ my $aref = $row_data{$_}; @$aref = grep{ $_->{whatever} == $foo } @$aref; }
Hope this helps,
Jeroen
"We are not alone"(FZ)
|
|---|