I think it should be unless($e), not unless(/$e/). When this change is made the code runs well. Please consider using the here file syntax for test scripts as it makes it easier to test them:
my @l = << 'END'; aaaa bbbb END
Thanks!
In reply to Re^5: getting ancestors of element
by philiprbrenan
in thread getting ancestors of element
by jccunning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |