Folks-
I'm having my Friday moment a little early this week...
Needing to learn about the LWP::Simple module, I wanted to cobble up a quick
test program. What to do... what to do... then, I began to wonder...
What is the lowest PM node_id I have access to?
use strict;
$|++;
use LWP::Simple qw($ua get);
$ua->proxy('http', 'http://myproxy');
# Skip nodes 0 and 17...
# for my $id (1..16, 17..50) { Ooops...
for my $id (1..16, 18..50) {
my $url = "http://www.perlmonks.org/?node_id=$id";
print "$url: ";
my $content=get($url);
if ( ($content) && ($content!~/You don.t have access to that node.
+/) )
{ print "Good\n"; last } else { print"\n" };
sleep 2;
}
I put the sleep in there so I didn't overload the server too much.
node_id=0: Ok, this is the Monastery gates, that doesn't count.
Hmmm, doesn't seem to work as a reference though - [id://]
node_id=17: is goofed up somehow, check it out [no such node, ID 17]
node_id=23: seems to be the winner Everything 2 Idea List
Now my paranoia kicks in. What do nodes 1..16,18..22 contain? What are the gods hiding? Are they talking about me...
-Craig
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|