Code:
{
$root = '.';
$title = links;
&include("$root/head.iht");
}
<h1>DWK's links</h1>
<p><big>H</big>ere are some links I've
accumulated. (On forums, unless otherwise noted, I'm usually the user
{&mono('dwks')}.)</p>
<p>Click <a href="links.htm" target="_new">here</a> to open a new window.</p>
{
my $data = {
'General' => [
{
'name' => 'Google',
'url' => 'http://www.google.com/',
'description' => 'My favorite search engine. ' . &mono(':)')
. ' To search for "C game programming", you can use ' .
&monolink("http://www.google.com/search?q=c+game+programming")
. ' -- useful for slow internet connections etc.'
},
{
'name' => 'Wikipedia',
'url' => 'http://www.wikipedia.org/',
'description' => 'An online encyclopedia.'
},
{
'name' => 'Firefox',
'url' => 'http://www.firefox.com/',
'description' => 'The home page for Mozilla Firefox, an excellent web browser.'
}
],
'Programming' => [
{
'name' => 'Dev-C++',
'url' => 'http://www.bloodshed.net/devcpp.html',
'description' => 'The download site for Dev-C++, a free Win32 development enviroment for C and C++.'
},
{
'name' => 'DJGPP',
'url' => 'http://www.delorie.com/djgpp/',
'description' => 'The download site for DJGPP (or RHIDE), a free DOS development enviroment.'
. ' It has POSIX support, and can compile really old programs that use DOS interrupts and int86'
. ' and graphics mode 13h.'
},
{
'name' => 'Nehe',
'url' => 'http://nehe.gamedev.net/',
'description' => 'An excellent site (with tutorials) for OpenGL.'
},
{
'name' => 'SDL',
'url' => 'http://www.libsdl.org/',
'description' => 'The offical SDL (Simple DirectMedia Layer) page. The SDL is a multi-platform'
. ' (Win32, Linux, Mac, etc) graphics (and sound, etc) library.'
}
],
'Programming forums' => [
{
'name' => 'CBoard',
'url' => 'http://cboard.cprogramming.com/',
'description' => "An excellent programming forum for C/C++/C# etc. There's also an FAQ, " .
&monolink("http://faq.cprogramming.com/") . ' The main page is at (you guessed it) ' .
&monolink("http://www.cprogramming.com/")
},
{
'name' => 'TPSBoard',
'url' => 'http://board.theprogrammingsite.com/',
'description' => 'A good (but small) programming forum, with sections for C, C++, Java, etc.'
},
{
'name' => 'DaniWeb',
'url' => 'http://www.daniweb.com/techtalkforums/',
'description' => 'A very busy board for programming and technology.'
}
]
};
foreach my $section (sort keys %$data) {
$OUT .= "<h3>$section</h3>\n"
. '<ul class="linklist">' . "\n";
foreach(@{$data->{$section}}) {
$OUT .= &include('linkitem.iht');
}
$OUT .= "</ul>\n\n";
}
}
{&include("$root/tail.iht")}
linkitem.iht