I'm using Web::Scraper module to scrape text. Given following HTML:
<p class="myClass">Blah Blah Blah </p>
Note the newlines in the paragraph. I'm trying to preserve the whitespace (newlines) when scraping with this line:
process '//p[contains(@class, "myClass")]', 'paragraph' => 'TEXT +',
This works but without newlines. I tried RAW instead of TEXT but still have the problem. I seem to remember there being a third option but I can't remember what it is. Thanks.
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
In reply to Preserving newlines with Web::Scraper by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |