Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

The Daily Travels of a PerlMonk

by rob_au (Abbot)
on Jan 10, 2002 at 17:16 UTC ( #137722=poem: print w/ replies, xml ) Need Help??

#!/usr/bin/perl # The Daily Travels of a PerlMonk # a few definitions before we continue ... our @worthy_nodes = ( 'informative', 'insightful', 'interesting', 'hum +ourous' ); our @unworthy_nodes = ( 'plagarism', 'demeaning', 'rude', 'insulting' +); # our votes are a function of the voting and experience system our $votes = { 'initiate' => 0, 'novice' => 5, 'acolyte' => 8, 'scribe' => 12, 'monk' => 16, 'friar' => 20, 'abbot' => 25, 'bishop' => 30, 'pontiff' => 35, 'saint' => 40, # 'vroom' => ??? How do you define an infinite? undef? }; # my level is a function of my xp, my votes are in turn derived from + my level my $level = &{ $xp }; my $votes = $votes{ $level }; # while not working ... yeah, right - should this be while (1) ? PM: while (!$work) { # iterate through our newest nodes, from the newest to the last +checked node our $newest_nodes; foreach $node ( $newest_node .. $last_checked_node ) { # should this be $content = &read( $node ) && eval $content +? &read( $node ); # if I have votes remaining ... if ($votes) { if ( eval { # evaluate if the node contains elements of @worthy_ +nodes grep { $node =~ /$_/ } @worthy_nodes }) { --$votes && $node++; # vote up the node my $xp += &{ $chance }; # xp changes as a functi +on of chance } elsif ( eval { # evaluate if the node contains elements of @unworth +y_nodes grep { $node =~ /$_/ } @unworthy_nodes }) { --$votes && $node--; # vote down the node my $xp += &{ $chance }; # xp changes as a functi +on of chance } else { next # move onto the next node } } else { next # move onto the next node } } } continue { goto PM; } exit; # should never be reached ... if it is, something drastic ha +s gone wrong!

 

perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'

Comment on The Daily Travels of a PerlMonk
Download Code
Re: The Daily Travels of a PerlMonk
by dmmiller2k (Chaplain) on Jan 10, 2002 at 18:57 UTC

    Trés cute.

    dmm

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: poem [id://137722]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (15)
As of 2014-08-27 17:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (247 votes), past polls