cat dragnet.pl
#!/usr/bin/perl
use strict;
use warnings;
use Mojo::DOM;
use feature 'say';
my $html = '
Telephone
0123-4 56 78 90
Telefax
just the fax ma\'am
';
my $dom = Mojo::DOM->new( $html );
my $phone = $dom->at('div.phone > p:nth-of-type(2)')->text;
say $phone;
my $fax = $dom->at('div.phone > p:nth-of-type(4)')->text;
say $fax;