#!/usr/bin/perl use warnings; use strict; use IO::File; use IO::Handle; use POSIX qw(strftime); use HTML::Entities qw(decode_entities); use File::Basename qw(basename); use DB_File; use Storable qw(freeze); use Getopt::Long; my $OUTDIR=q(/home/don/records/tweekin); my %options = (skip => 1); GetOptions(\%options,'skip|s!','debug|d+','help|h|?','man|m'); my $DATE=strftime(q(%Y_%m_%d),localtime(time)); my %tw_db; tie %tw_db, 'DB_File', "$OUTDIR/tweekin.db" or die "Unable to tie file: $!"; system('mkdir','-p',"$OUTDIR/tweekin_$DATE") == 0 or die "Unable to mkdir: $!"; chdir qq($OUTDIR/tweekin_$DATE); # get weekly summary system('wget','--quiet','-c','http://www.tweekin.com/weeklysummary.htm'); my $summary_fh = new IO::File q(weeklysummary.htm),'r'; my @files_to_get; local $/ = undef; my @summary = split m#\s*\s*