--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.perltidyrc Fri Sep 18 00:07:27 2009 +0200
@@ -0,0 +1,1 @@
+/home/heiko/.perltidyrc
\ No newline at end of file
--- a/upload.pl Thu Sep 17 23:59:52 2009 +0200
+++ b/upload.pl Fri Sep 18 00:07:27 2009 +0200
@@ -16,7 +16,7 @@
use File::Basename;
use Digest::SHA1 qw(sha1_hex);
-my $DIR = "upload.d";
+my $DIR = "upload.d";
my $LINK_DIR = dirname($ENV{SCRIPT_NAME}) . "$DIR";
-d $DIR
@@ -24,8 +24,7 @@
or die "Can't mkdir $DIR: $!\n";
MAIN: {
- print header(-charset => "UTF-8"), start_html,
- h1 "View: $ENV{REMOTE_USER}";
+ print header(-charset => "UTF-8"), start_html, h1 "View: $ENV{REMOTE_USER}";
# print Dump;
@@ -68,10 +67,11 @@
foreach (map { /(.*)/ } sort { -M $a <=> -M $b } glob "$DIR/*-*/*") {
my ($file, $dir) = fileparse($_);
$dir = basename $dir;
+
# $dir =~ /(?<hash>\S+)-(?<expires>\d+)$/ or next;
$dir =~ /(\S+)-(\d+)$/ or next;
- my $hash = $1;
- my $expires = $2;
+ my $hash = $1;
+ my $expires = $2;
if (${expires} <= time) {
/(.*)/;
unlink $_ or die "Can't unlik $_: $!\n";