in reply to Strip that XML!
Here's another easy method:
(Note that it leaves XML entities undecoded, as noted in the reply.)$_ = <<EOF; <xml> <email>toto@foo.com</email><name>Toto</name> <email>tata@bar.com</email><name>Tata</name> <email>tutu@baz.com</email><name>Tutu</name> </xml> EOF my @email = /<email>(.*?)<\/email>/g; my @name = /<name>(.*?)<\/name>/g;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Answer: Strip that XML!
by Anonymous Monk on Mar 01, 2009 at 08:19 UTC |
In Section
Seekers of Perl Wisdom