in reply to How to remove elements from XML data?

IMO, the grep route is the cleanest way:

$xref->{node} = [grep { $_->{val} != 2; } @{$xref->{node}}];

We're not surrounded, we're in a target-rich environment!

Replies are listed 'Best First'.
Re^2: How to remove elements from XML data?
by Maxim (Sexton) on Oct 06, 2004 at 08:56 UTC
    I don't understand how you use this. $xref->{node} = [grep { $_->{val} != 2; } @{$xref->{node}}];
    which module you are using??
    Maxim