#!/usr/bin/perl -w
use strict;
use DB_File;

my %hate;
tie %hate, 'DB_File', '.hate.db';

my @stuff;
foreach (keys %hate) {
    push @stuff, [$_, $hate{$_}];
}

@stuff = sort {$a->[1] <=> $b->[1] || $a->[0] cmp $b->[0]} @stuff;

foreach (@stuff) {
    $_->[0] =~ s/ /\\ /g;
    print $_->[1], "\t", $_->[0], "\n";
}
