find comments (Mojo::Dom)

Skip to first unread message

Dec 9, 2020, 3:26:35 AM12/9/20
to Mojolicious

I'm not sure if this is obvious or not.

I have some *very* old webpages what I need to have archived. But that site used Apache Server Side Includes (yes that old)

So I wanted to see if there are any of these magic comments left. Yes, I can easily do this with a normal find and grep in the commandline, but since I like working with Mojo::DOM I'd like to see if I could do it with this as well.

Is there any way of getting the comments other can looking at the type of all the tags?

I didn't see anything obvious via $dom -> find



Lars Madsen

Dec 9, 2020, 3:52:00 AM12/9/20
Seems this is probably the easiest

for my $e ( $dom -> descendant_nodes -> each ) {
   next unless $e -> type eq 'comment';
   say $e;


You received this message because you are subscribed to a topic in the Google Groups "Mojolicious" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages