in reply to multiple regex matching

It is not clear to me, but is this an answer?
while (<DATA>) { if (my ($a, $b, $c, $d) = (m/TD class=i><A href="([^"]*)"\s*>([^<] +*)<.*TD class=j><A href="([^"]*)"\s*>([^<]*)</)) { print "($a, $b, $c, $d)\n"; } } __END__ <TR class=g><TD class=i><A href="/page1.html">Page name here</A></TD>< +TD class=j><A href="/page2.html">Other page name here</A></TD></TR> <TR class=h><TD class=i><A href="/blahblah.html">lah blah</A></TD><TD +class=j><A href="/ribbit.html">Ribbit</A></TD></TR>
-- gam3
A picture is worth a thousand words, but takes 200K.

Replies are listed 'Best First'.
Re^2: multiple regex matching
by Anonymous Monk on Apr 14, 2005 at 01:10 UTC
    yes!!! That is exactly it! That's what I need to do.

    I can get your demo working but do I need to save the html into an array in order to do this while loop?

    Thanks.

      My solution saves the data into an array of hashes.


      ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
      =~y~b-v~a-z~s; print