Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Munging a XML data

by kilinrax (Deacon)
on Aug 06, 2001 at 23:22 UTC ( [id://102561]=note: print w/replies, xml ) Need Help??


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);

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://102561]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (8)
As of 2024-03-28 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found