At Sat, 16 Aug 2003 11:45:21 +1000, Louis Selvon wrote: > I am trying to extract all the data from the table under the "Team", > "Manager", "TP" stuff.
HTML::TableExtract makes tasks like that trivial. I strongly recommend you check it out (you can find it on CPAN if it isn't already packaged for your distro). > 2. if ($_ =~ m/<tr><td\s*(.*)><font size=1 face=Verdana > color=#FFFFFF>(.*)<\/font><\/td><td\s*(.*)><font size=1 face=Verdana > color=#FFFFFF>(.*)<\/font><\/td><td\s*(.*)><font size=1 face=Verdana > color=#FFFFFF>(.*)<\/font><\/td><td\s*(.*)><font size=1 face=Verdana > color=#FFFFFF>(.*)<\/font><\/td><\/tr>/g) > (This just returns the last 0). > > 3. As a test I just printed each line as it's read from ($_), I noticed that > the whole section I want is printed as a sinle string when $_ gets to it. a match "in array context" will give you a list of the grouped matches. ie: @matches = $_ =~ m/<tr><td\s*(.*)><font size=1 face=Verdana color=#FFFFFF>(.*)<\/font><\/td><td\s*(.*)><font size=1 face=Verdana color=#FFFFFF>(.*)<\/font><\/td><td\s*(.*)><font size=1 face=Verdana color=#FFFFFF>(.*)<\/font><\/td><td\s*(.*)><font size=1 face=Verdana color=#FFFFFF>(.*)<\/font><\/td><\/tr>/g; use Data::Dumper; print Dumper([EMAIL PROTECTED]); -- - Gus -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
