Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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


In reply to How Low Can I Go? by cmv

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • 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 or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2021-10-22 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?