Perl program for diaries with tags