in reply to Parse into array

Given that you are trying to parse html, have you considered HTML::Parser?

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.