First, the standard warning that if you're parsing HTML then you should use an HTML parser rather than regular expressions.
Your regex only has one set of capturing brackets, so only $1 gets a value. You need something like this:
if (my @text = $text =~ m|</td><td>([^ ]*)</.|g) { print "@text\n"; }
Note also the use of alternative delimiters for m// which makes the code more readable.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: problem with parsing
by davorg
in thread problem with parsing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |