in reply to Munging a XML data

Use splice:
my $match = qr/foo|bar/; for my $i (0 .. $#{ $ref->{news} }) { if ( $ref->{news}[$i]{title} =~ $match ) { splice @{ $ref->{news} }, $i, 1; } }


ar0n ]