10 my $q = CGI::Simple->new({num=>100});
12 my $cat_dir = '/home/don/debian/.cat/';
23 print $q->header(-status => 200);
29 <title>Cat Pictures!</title>
32 <header class="header"><span class="title">Cat Pictures!</span></header>
34 <section class="catpictures">
38 my $previous_date = '';
39 for my $pic (sort {$pics{$b}->ctime <=> $pics{$a}->ctime} keys %pics) {
40 my $this_date = POSIX::strftime('%Y-%m-%d',time($pics{$pic}->ctime));
41 if ($previous_date ne $this_date){
42 print "<p>$this_date</p>\n";
43 $this_date = $previous_date;
46 $basename =~ s/\.html//;
48 <a href="$pic"><img src="${basename}.jpg" width=100 height=100 alt="$basename"></a>
57 <span class="footer">A silly CGI script</span>
63 my ($q,$error,$text) = @_;
65 print $q->header(-status => $error);
66 print "<h2>$error: $text</h2>";