Debunking Stroustrup's debunking of the myth “C++ is for large, complicated, programs only” Stroustrup has recently posted a series of posts debunking popular myths about C++. The fifth myth is: “C++ is for large, complicated, programs only”. To debunk it, he wrote a simple C++ program downloading a web page and extracting links from it. Here it is:
#include &lt;string&gt;
#include &lt;set&gt;
#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;regex&gt;
#include &lt;boost/asio.hpp&gt;

using namespace std;

set&lt;string&gt; get_strings(istream&amp; is, regex pat)
{
    set&lt;string&gt; res;
    smatch m;
    for (string s; getline(is, s);)  // read a line
        if (regex_search(s, m, pat))
            res.insert(m[0]);              // save match in set
    return res;
}

void connect_to_file(iostream&amp; s, const string&amp; server, const string&amp; file)
// open a connection to server and open an attach file to s
// skip headers
{
    if (!s)
        throw runtime_error{ &quot;can't connect\n&quot; };

    // Request to read the file from the server:
    s &lt;&lt; &quot;GET &quot; &lt;&lt; &quot;http://&quot; + server + &quot;/&quot; + file &lt;&lt; &quot; HTTP/1.0\r\n&quot;;
    s &lt;&lt; &quot;Host: &quot; &lt;&lt; server &lt;&lt; &quot;\r\n&quot;;
    s &lt;&lt; &quot;Accept: */*\r\n&quot;;
    s &lt;&lt; &quot;Connection: close\r\n\r\n&quot;;

    // Check that the response is OK:
    string http_version;
    unsigned int status_code;
    s &gt;&gt; http_version &gt;&gt; status_code;

    string status_message;
    getline(s, status_message);
    if (!s || http_version.substr(0, 5) != &quot;HTTP/&quot;)
        throw runtime_error{ &quot;Invalid response\n&quot; };

    if (status_code != 200)
        throw runtime_error{ &quot;Response returned with status code&quot; };

    // Discard the response headers, which are terminated by a blank line:
    string header;
    while (getline(s, header) &amp;&amp; header != &quot;\r&quot;)
        ;
}

int main()
{
    try {
        string server = &quot;www.stroustrup.com&quot;;
        boost::asio::ip::tcp::iostream s{ server, &quot;http&quot; };  // make a connection
        connect_to_file(s, server, &quot;C++.html&quot;);    // check and open file

        regex pat{ R&quot;((http://)?www([./#\+-]\w*)+)&quot; }; // URL
        for (auto x : get_strings(s, pat))    // look for URLs
            cout &lt;&lt; x &lt;&lt; '\n';
    }
    catch (std::exception&amp; e) {
        std::cout &lt;&lt; &quot;Exception: &quot; &lt;&lt; e.what() &lt;&lt; &quot;\n&quot;;
        return 1;
    }
}

Let's show Stroustrup what small and readable program actually is.

Download http://www.stroustrup.com/C++.html

List all links:
 http://www-h.eng.cam.ac.uk/help/tpl/languages/C++.html
 http://www.accu.org
 http://www.artima.co/cppsource
 http://www.boost.org
 ...



You can use any language, but no third-party libraries are allowed.
Winner
C++ answer won by votes, but it relies on a semi-third-party library (which is disallowed by rules), and, along with another close competitor Bash, relies on a hacked together HTTP client (it won't work with HTTPS, gzip, redirects etc.). So Wolfram is a clear winner. Another solution which comes close in terms of size and readability is PowerShell (with improvement from comments), but it hasn't received much attention. Mainstream languages (Python, C#) came pretty close too.
Comment on subjectivity
The most upvoted answer (C++) at the moment votes were counted was disqualified for not following the rules listed here in the question. There's nothing subjective about it. The second most upvoted question at that moment (Wolfram) was declared winner. The third answer's (Bash) &quot;disqualification&quot; is subjective, but it's irrelevant as the answer didn't win by votes at any point in time. You can consider it a comment if you like. Furthermore, right now the Wolfram answer is the most upvoted answer, the accepted one, and is declared winner, which means there's zero debate or subjectivity.
Wolfram

This feels like complete cheating

Import["http://www.stroustrup.com/C++.html", "Hyperlinks"]


So just add some honest parsing on top

Cases[
 Import["http://www.stroustrup.com/C++.html", "XMLObject"],
 XMLElement["a", {___, "href" -&gt; link_, ___}, ___] :&gt; 
  link /; StringMatchQ[link, RegularExpression["((http://)?www([./#\\+-]\\w*)+)"]]
, Infinity]