http://qs1969.pair.com?node_id=102561


in reply to Munging a XML data

I think this is an ideal place to use grep:
#!/usr/bin/perl -w use strict; use Data::Dumper; my $data = { 'news' => [ { 'title' => 'news1', 'content' => 'Article Contents...blah', 'date' => '08-03-01' }, { 'title' => 'news2', 'content' => 'Article Contents...blah', 'date' => '07-20-01' } ] }; @{ $data->{news} } = grep { $_->{title} ne 'news1' } @{ $data->{news} +}; print Dumper(\$data);