#! /usr/bin/perl use strict; use warnings; use Getopt::Std; use Math::BigInt; my %player_hash; # key (player id) => (# trans to, total amt to them, last time to them, # # trans from, total amt from them, last time from them) # money_hash is a global hash referece for whatever player we are analyzing my $money_hash; my $cnt = 0; my $sort_val = 0; my $max_cnt = 0; my %args; my $start_time; my $min_thresh = 0; my $max_thresh = 0; my $player_id = 0; my $start_date; my $end_date; my $num_days; my $total_in = new Math::BigInt '0'; my $total_out = new Math::BigInt '0'; my $num_total_in = new Math::BigInt '0'; my $num_total_out = new Math::BigInt '0'; my @keys; my $big_zero = new Math::BigInt '0'; my $str_out; my $abridged = 1; # Usage sub usage { my $name = $0; $name =~ s/^(.*)\\//; print STDERR "\nUsage:\n"; print STDERR "\t$name ... (as many player ids as you want to scan)\n"; print STDERR "\t\tDate format = yyyy-mm-dd (eg: 2004-06-08)\n"; print STDERR "\t$name -f ... (as many player ids as you want to scan)\n"; print STDERR "Optional parameters:\n"; print STDERR "\t[-l ] [-s | -S ] [-n | -a | -t | -N | -A | -T] [-m | -x | -e ] [-d]\n"; print STDERR "\t-l \tOnly process lines of log file\n"; print STDERR "\t-s