in reply to Re^4: PERL scripts-Yahoo Groups Download-i get an error
in thread PERL scripts-Yahoo Groups Download-i get an error

Sorry - I assumed a little too much about what you know about regular expressions.

In Perl regular expressions, unescaped parentheses signal that we're going to capture anything that matches the pattern inside the parens. There are no parens expected to be matched in the text we're analyzing; they're just a shorthand for "See this pattern here, between these parens? I want to save the stuff that this part of the pattern matches".

Here's an example. If we had this:

my($meta_thing) = ($string =~ /(foo|bar|baz)/;
we'd be saying, "please look for a 'foo', a 'bar' or a 'baz' string in the variable $string. If you find any of those matches, please save the thing you matched into $meta_thing". The pattern you have in the code you're looking at essentially says "please find an HTML comment that looks like this (don't save that); then skip however many whitespace characters you find (don't save those either); then start capturing every character you see up to the first time you find the other HTML comment (and save those); when you see the second comment, quit capturing, and save all the stuff you captured into /$cells. Don't save the second comment either."

The code after that is trying to break out table rows and cells from the stuff that was captured. Does that help clear it up a bit more?

I highly recommend reading perldoc perlre if you have no Perl books. I also recommend getting hold of "Learning Perl" if you want to learn more about this stuff.