Once you have the list of author nodes, you could iterate through it, fetching the books node to the right of each author node. By calling ->right in list context, as you have done, you will fetch all the nodes to the right which is likely why you are reporting too many siblings. You should call ->right in scalar context.

An example:

Code

#!/usr/bin/perl use strict; use warnings; use HTML::TreeBuilder; use Data::Dumper;