#!/usr/bin/perl # prints a list of papers with all the ages of their # citations and hits. # Author: Ian Hickman use strict; my (@field, %table); print STDERR "opening downloads\n"; opendownloads(); print STDERR "and the rest\n"; while( ){ @field=split; if( exists( $table{$field[0]} )){ print"cits: @field\n"; print"hits: $field[0] $table{$field[0]}\n"; } } sub opendownloads{ open( FILE, "misc/hitsandage" ) || die"Cant open: $!"; while( ){ @field=split; if( !(exists( $table{$field[0]} )) ){ for( my $i=1; $i<@field; $i++ ){ $table{$field[0]}.=$field[$i]." "; } } } close( FILE ) || die"Cant close: $!"; }