#! /usr/bin/perl use CGI; use HTML::Entities; use POSIX; use strict; use warnings; require './config.pm'; my $num_last = 20; # Find the latest N PNG thumbnails. Somewhat ineffective, but I assume # we'll get to that later :-) my @thumbnails = (sort { -M $a <=> -M $b } <$pdfweb::config::outputdir/*.png>); my $real_num_last = scalar @thumbnails; if ($real_num_last > $num_last) { $real_num_last = $num_last; } # Sorry, no HTML templating. I didn't want to pull in yet another # dependency :-) print <<"EOF"; Content-type: text/html; charset=utf-8
Web PDF converter, © 2005 Steinar H. Gunderson.
EOF