in reply to Cropping the output of the pattern matcher

My first response is HTML::TableExtract, but that's too easy. ;)

Looks like some of your slashes are going the wrong way... but anyhoo - if you want to 'crop' the data you need to do a little syntactical trick:

while(<>) { if (my ($matched) = $_ =~ />([^<]+)</) { print "'$matched': on line $.\n"; } }
Instead of matching something so specific (\w and \s), match everything BUT the closing tag: [^<]+

jeffa