A super-simple (and fast) way, depending on what you're doing with this array, would be:
@parts = split /[<>]/, $data;
Then when iterating through @parts, just keep in mind that (index % 2 == 1) means that part was inside angle brackets. (Your array would start with an empty string for the data you gave)
In reply to Re: Split tags and words nicely
by Anonymous Monk
in thread Split tags and words nicely
by bwgoudey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |