4 $dir="/usr/local/etc/httpd/htdocs/Dilbert";
5 $location ="$dir/dilbert.gif";
6 $_ = get("http://www.unitedmedia.com/comics/dilbert/index.html");
7 s/^.*strip_left\.gif//s;
10 $line = "http://www.unitedmedia.com" . $_;
11 # Back up yesterday's image:
18 `mv $location $dir/dilbert.$id.gif`;
19 # If you're using this on NT, you may want to replace 'mv'
24 # Now get the actual image
26 open (FILE, ">$location");
27 binmode FILE; # Important for NT
30 # Now I want to update the index.html file
31 open (FILE, "$dir/index.html");
34 $yesterday = parsedate('yesterday');
35 $printdate = strftime('%a, %b %d', localtime($yesterday));
36 open (FILE, ">$dir/index.html");
40 print FILE "<td><a href=\"dilbert.$id.gif\">$printdate</a></td>\n";
41 if (($id % 5) == 0) {print FILE "</tr><tr>\n"}
43 else {print FILE "$_"};