in reply to how to print div tag value with ul and ol tag value

is this what you want (oneliner)?

$ perl -Mojo -E 'say g("http://www.sqlite.org/expridx.html")->dom->fin +d("p, ul")->map("all_text")->join("\n\n")'
I get both the p and ul elements.