« Iraq on the Record Database | Main | shipyard dorkbot »


Feed You can follow this conversation by subscribing to the comment feed for this post.


I'm relieved it went well. I saw you go through all that although I didn't really know what was going on. I'm so proud of you!


you said you need to "store the data in a hash table where the key is the requested url and the value is an array of all the different unique refers for that post"

my $d = {};
while() {
my ($req_url, $refer) = parse_line($_);
if(!exists($d->{$req_url})) {
$d->{$req_url} = {};
$d->{$req_url}->{$refer} = 1;

foreach my $k (keys %$d) {
print "URL: $k\n";
foreach my $r (keys %{$d->{$k}}) {
print "\tREFERER: $r\n";

this could definitely be done in many fewer lines, but i thought i'd be more expressive just for illustration's sake.

obviously i'm working at home and procrastinating the shit out of my friday afternoon.

The comments to this entry are closed.