FinikiWiki is a Perl5 Wiki that was written in response to the ShortestWikiContest. It was written by FrankCrist, is 38 lines of Perl5, and uses a MySQL database to store the pages. FinikiWiki is Object Oriented and mostly well-formed. I opted out of using the -w flag for brevity. Someone wrote a shorter WikiWiki clone using 28 lines of Perl and man that burns me! But mine uses a database instead of the filesystem, so nyah nyah. http://finiki.qaip.com/ ''Somebody erased your Source''''''Code page. Could you put it back?'' ---- From a copy I made some time ago (correct as needed): #!/usr/bin/perl use CGI qw(:cgi); use DBI; $c = new CGI; $d = DBI->connect ('dbi:mysql:finiki','xxxx','xxxx') or die; ($p = ($x = $c->path_info) ? $x : 'Finiki''''''Wiki') =~ s/^\/.*?\/(.*?)$/$1/; ($o = ($x = $c->param('b')) ? $x : undef) =~ s/'/\\'/g; if ($c->path_info =~ /^\/update/) { $i = $d->do ("insert into pages set pagename = '$p', body = '$o\n'"); $i = $d->do ("update pages set body = '$o\n' where pagename = '$p'") if !$i;} $b = $d->selectrow_array ("select body from pages where pagename = '$p'"); $b = $d->selectrow_array ("select body from pages where pagename = 'Blank''''''Page'") if !$b; $b = "

" if ($c->path_info =~ /^\/edit/); $t = $d->selectall_arrayref ("select body from pages where pagename = 'Top''''''Header' or pagename = 'Bottom''''''Header' order by pagename desc"); map {$$t[$_][0] = wikiformat ($$t[$_][0])} (0,1); $b = wikiformat ($b) if $c->path_info !~ /^\/edit/; $n = "\n

[Edit this page]"; $b = "Content-type: text/html\n\n$p".$$t[0][0] . $b . $n . $$t[1][0]; $d->disconnect; print $b; sub wikiformat { my $z = shift; $z =~ s/\n/<br>\n/gs; $z =~ s/''''''/""""""/gs; $z =~ s/'''(.*?)'''/<b>$1<\/b>/gs; $z =~ s/''(.*?)''/<i>$1<\/i>/gs; $z =~ s/^----.*$/<hr>/gs; $z =~ s/^ (.*)$/<font face="courier">$1<\/font>/gm; for my $f ($z =~ /((http:|ftp:|gopher:|news:|mailto:)\S+)/gm) { ($v = $f) =~ s/(ftp:|http:|gopher:|news:|mailto:)(.+)/<a href="$1\/\/$2">$2<\/a>/; $v =~ s/([A-Z][a-z_0-9]+([A-Z][a-z_0-9]+)+)/""""""$1""""""/gm; $z =~ s/\Q$f/$v/gsme;} $z =~ s/\b(?<!"{6})([A-Z][a-z_0-9]+([A-Z][a-z_0-9]+)+)(?!"{6})\b/<a href="\/index.cgi\/view\/$1">$1<\/a>/gsx; $z =~ s/"{6}//gs; return $z; } Inserted sequences of six apostrophes to prevent WikiWiki from creation of links to nonexistent pages -- MarkusSrank ---- CategoryWikiImplementation