Here is an example to get you started, based upon Mojo::DOM:
use strict;
use warnings;
use feature 'say';
use Mojo::DOM;
my $html = '<span class="details-title-text">
<strong>$8.39</strong>
</span>
<span class="details-title-text">
<strong>$1</strong>
</span>
<div>
<strong>do not find me</strong>
</div>
<span>
<strong>find this</strong>
</span>';
my $dom = Mojo::DOM->new( $html );
for my $element ($dom->find('span strong')->each) {
say $element->text;
}
output:
$8.39
$1
find this
I'll leave determining if the element text is a price as an exercise for you.