Catman...l_text(3pm)
β¨ NAME β¨
Catmandu::Fix::html_text β bestie, this one keeps only the textual data in the HTML π like it strips away all the markup noise and leaves you the words, periodt.
πΈ SYNOPSIS πΈ
okay so here's the vibe, two ways to run it π
# keep only the text
html_text()
# returns:
# html: "<html>...</html>"
and if you want the output as an array_ref instead of one big string, just pass split:1 π
# keep only the text but return an array_ref
html_text(split:1)
# returns:
# html:
# - <html>
# - ...
# - </html>
so like, no split, you get the whole thing as one string. With split:1, you get every line as its own lil item in a list. iconic behaviour honestly π¦
π SEE ALSO π
Catmandu::Fixβ the main character that makes all of this possible, iykyk π
fr fr that's the whole page, no cap. this is Catmandu::Fix::html_text from the User Contributed Perl Documentation, and it was documented as part of perl v5.36.0 on 2023-02-14. happy fixing bestie, go slay π
πβ¨
π¦ where this page comes from
- debian trixie: libcatmandu-html-perl 0.02+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-html-perl 0.02+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-html-perl 0.02+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-html-perl 0.02+dfsg-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms