$logfile =~ /(.*)..\.tar.gz$/ or die "Bad non-match on $logfile"; my $dirname = $1;