Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

(jeffa) Re: When Make New Level, Do...

by jeffa (Bishop)
on Dec 23, 2002 at 01:18 UTC ( #221790=note: print w/ replies, xml ) Need Help??

in reply to When Make New Level, Do...

Not a bad idea ... but why not just write a Perl script that downloads your home node, parses out your current experience and sends you a /msg. How about one that keeps track of new additions to Saints in our Book and /msg's them with a congradulation. Remember, this is Perl Monks - we can make our own bells and whistles for the site. ;)

Here is some code to get you going ... check out Personal Nodelet Extractor for some example code to log you in and post a message ... oh, and you might want to utilize an HTML Parser instead of using that fragile regex.

use strict; use warnings; use LWP::Simple; my $node = shift or die 'gimme a node #'; my $html = get("$node"); my ($exp) = $html =~ m{<td>Experience:</td>\s+<td><b>(\d+)}; my %level = ( initiate => 0, novice => 20, acolyte => 50, scribe => 100, monk => 200, friar => 500, abbot => 1000, bishop => 1600, pontiff => 2300, saint => 3000, ); print "You made Monk!!!\n" if $exp >= $level{monk};


(the triplet paradiddle with high-hat)

Comment on (jeffa) Re: When Make New Level, Do...
Download Code
Replies are listed 'Best First'.
Re: (jeffa) Re: When Make New Level, Do...
by arrow (Friar) on Dec 23, 2002 at 01:48 UTC
    Thanks jeffa, I'll try that...

    Just Another Perl Wannabe

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://221790]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2015-10-08 21:15 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (228 votes), past polls