All pastes #336002 Raw Edit

Something

public text v1 · immutable
·published 2007-02-01 19:24 UTC
rendered paste body
#! /usr/bin/perl

use CGI qw(:standard);
print header();

my $data;
$file = "dkp40.html";
{
local $/;
open SLURP, $file or die "can't open $file: $!";
$data = <SLURP>;
close SLURP or die "cannot close $file: $!";
}

my %dkp_hash;

#maak rij afsluiters 1 character lang
$data =~ s/<\/tr>/#/g;

#print $data;

while($data =~ s/amp;name=([^"]+)"[^#]+<td width="60" nowrap="nowrap" class="[^"]+">([^<]*)<\/td>[^#]*#//m){
			      $dkp_hash{$1} = $2/1000; #lol gedeelt door 1000 haha

}

			    $data = '';
$file = "dkp20.html";
{
local $/;
open SLURP, $file or die "can't open $file: $!";
$data = <SLURP>;
close SLURP or die "cannot close $file: $!";
}

#maak rij afsluiters 1 character lang
$data =~ s/<\/tr>/#/g;

#print $data;

while($data =~ s/amp;name=([^"]+)"[^#]+<td width="60" nowrap="nowrap" class="[^"]+">([^<]*)<\/td>[^#]*#//m){
			      $dkp_hash{$1} += $2*33; # haha keer 33 LOL!
				   print "INSERT BLA MUSQL $1 HAS NOW " .$dkp_hash{$1} . " DKP LOL!\n";
}