for( my $RightNode = $Node->right; (defined $RightNode) && ($RightNode->attr('class') !~ m/^secTitle$/i); $RightNode = $RightNode->right) { }