Just using this Mojo::DOM for the first time and having trouble to extract information based on a previous tag. Looking for a way to grab 'The description'.
#!/usr/bin/perl
require v5.10;
use feature qw(say);
use Mojo::DOM;
my $html = q(<p><strong>Description</strong></p><p>The description</p> <p><strong>Usage</strong></p><p>How to use this tool</p>);
my $dom = Mojo::DOM->new( $html );
say $dom->find('p strong')->map('text')->join("\n"); # Description
To get the first one, you can do this
Or to get all of them