On Thu, Sep 06, 2012 at 03:09:28PM -0400, Brandon McCaig wrote:
>     print trim($element->text()), "\n";

Sorry, I seem to have left out the definition of trim from my
example.. For completeness, it would be something along these
lines:

sub trim {
    my ($string) = @_;
    $string =~ s/\A\s+//;
    $string =~ s/\s+\z//;
    return $string;
}

I only did that because the output had a bunch of extra
whitespace lines, which I didn't bother to investigate beyond
trimming the elements' text...

Regards,



-- 
Brandon McCaig <bamcc...@gmail.com> <bamcc...@castopulence.org>
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bamccaig.com/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'

Attachment: signature.asc
Description: Digital signature

Reply via email to