package OrkutStats;
use strict;
require Exporter;
our @ISA = qw(Exporter);
our @EXPORT= qw(GetOrkutStats);

use IO::File;

sub GetOrkutStats {
    my $fh= IO::File->new("percountry.txt", "r") or die "Orkutstats: $!\n";

    my %orkutstats;
    while (<$fh>) {
        if (/(\d+)\s+(\d+)\s+(\d+)\s+(.*)/) {
            my ($tot, $fem, $male, $name)= ($1, $2, $3, $4);
            $orkutstats{lc($name)}= { name=>$name, female=>$fem, male=>$male, total=>$tot };
        }
    }
    return \%orkutstats;
}

1;
