in reply to record separator causing problems
In addition to the solution given by ++hippo, note that if there is more than one html element then to get the first one you need to make the quantifier non-greedy:
m{<html>(.*?)</html>}s
That said, you’d most likely be better-off (in the long run) using one of the dedicated XML modules: XML::Simple, XML::Twig, XML::Compile, XML::Tiny, XML::LibXML, ....
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: record separator causing problems
by jellisii2 (Hermit) on Dec 19, 2013 at 12:45 UTC | |
by hippo (Archbishop) on Dec 19, 2013 at 13:45 UTC |