in reply to removing element from hash array
I also don't know from your example whether you want to (a) remove all "warning" (which is my code) or (b) keep all "error". It would be better if you had a better example, or a text description of what you had wanted.@$_ = grep {not $_->{type} eq "warning"} @$_ for $UNNAMED_TOP_THINGY{l +ist}{find};
I mean, based on your example, this would also have worked:
But I doubt that would have satisfied you. {grin}%UNNAMED_TOP_THINGY = ( 'list' => { 'find' => [ { 'type' => 'error', 'column' => '106', } ] } );
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
@$_ = grep {not $_->{column} == 1} @$_ for $UNNAMED_TOP_THINGY{list}{f +ind};
|
|---|