register-namespace xh http://www.w3.org/1999/xhtml ; open 1.xhtml ; for //xh:tr[@class="Odd"] { my $s = xh:td/xh:script ; if $s echo Script: $s ; my $o = xh:td[2] ; if $o echo Other: $o ; }