If your HTML is not terribly complex, you could use something like YAML
use strict;
use warnings;
use Data::Dumper;
use YAML;
# Load a YAML stream of 3 YAML documents into Perl data structures.
my $data = do {local $/ = <DATA> };
my @yaml = Load( $data );
for my $hash (@yaml) {
my $question = $hash->{question};
my $answer = $hash->{answer};
print "q: $question\na: $answer\n";
}
__DATA__
---
question: <b>What... is your name?</b>
answer: <p>My name is Sir Lancelot of Camelot.</p>
---
question: <b>What... is your quest?</b>
answer: <p>To seek the Holy Grail.</p>
---
question: <b>What... is your favourite colour?</b>
answer: <p>Blue.</p>