if ($html =~ m#(.+?)#is) { @urls = grep { $_ !~ m#microsoft\.com|netscape\.com# } $& =~ m### if ($html =~ m#(.+?)#is) { $noframes = $1; } else { die "Couldn't find noframes tags"; } while ($noframes =~ m#]+>#gis) { my $link = $&; my ($url) = $link =~ m#href\s*=\s*"([^"]+)"#i; if ($url and $url !~ m#microsoft\.com|netscape\.com#i) { push (@urls, $url); } }