$_ = $content; #content holds the html while (m@href=\"\./\d+\.html\">(.+)@g) {push (@array, $1);}