Date: Tue, 29 Oct 2002 11:51:28 +0000
From: Harwood <Harwood@scotoma.org>
To: Recipient List Suppressed <Harwood@scotoma.org>
Subject: redistribution.pl


------------=_1035890506-655-8

#   Perl Routines for the redistribution of the worlds wealth 
#   Takes the cash from the rich and turn it into clean drinking water wells. 
#   w.blake@scotoma.org
#   v 0.0.1 

#   Copyright (c) 1792-2002 William Blake  
#   Unpublished work reconstituted W.Blake@Scotoma.org.
#   Permission granted to use and modify and append this library so long as the
#   copyright above is maintained, modifications are documented, and
#   credit is given for any use of the library.
#   This code is distributed under the same conditions as perl itself
#   This code is distributed with no warrenty whatsoever.
#   Thanks are due to many people for reporting bugs and suggestions

#   For more information, see http://www.scotoma.org



#Constants

my $SKINT = 0;
my $TO_MUCH = $SKINT + 1;

#This is a anonymous hash record to be filled with the Name and Cash of the rich
%{The_Rich} = {
    0 =>{
        Name        => '???',
        Cash        => '???',
    },
} 
#This is a anonymous hash record to be filled with the Price Of Clean Water
#for any number of people without clean water
%{The_Poor} = {
    0 =>{
        PlaceName           => '???', #the place name were to build a well
        PriceOfCleanWater   => '???',
        Cash                => '???',
    },
} 

# for each of the rich, process them one at a time passing 
#them by reference to RedistributeCash.
foreach my $RichBastardIndex (keys %{The_Rich}){
    &ReDisdributeCash(\%{The_Rich->{$RichBastardIndex}});
}


#This is the core subroutine designed to give away
# cash as fast as possible.
sub ReDisdributeCash {
    my $RichBasterd_REFERENCE = @_;
    
    #go through each on the poor list giving away Cash until each group
    # can afford clean drinking water
    while($RichBasterd_REFERENCE ->{CASH} >=  $TO_MUCH ){
        
        foreach my $Index (keys @{Poor}){
            $RichBasterd_REFERENCE->{CASH}--;
            $Poor->{$Index}->{Cash}++;
            if( $Poor->{$Index}->{Cash} =>
$Poor->{$Index}->{PriceOfCleanWater}){
                &BuildWell($Poor->{$Index}->{PlaceName} );
            }
            
        }
    
    }   


}

------------=_1035890506-655-8
Content-Disposition: inline; filename="message.footer"


-----Syndicate mailinglist-----------------------
Syndicate network for media culture and media art
information and archive: http://anart.no/~syndicate
to post to the Syndicate list: <syndicate@anart.no>
Shake the KKnut: http://anart.no/~syndicate/KKnut
no commercial use of the texts without permission
------------=_1035890506-655-8--



Back to nettime unstable digest vol 19