in reply to RE: Main linker script
in thread Main linker script

Ick, duplicated code. :) You can use a hash, but why not an array?
my @pages = ( 'frontpage.html', 'aboutus.html', 'login.html', ); # extra comma is there so adding new pages is easier my $num = CGI::param('Num') || 1; page($num - 1); # or put a dummy at the start of @pages sub page { $| = 1; my $num = shift; if (open(FILE, $pages[$num])) { print while <FILE>; } }
A hash would work too, but if you're using numeric offsets already...

You could even make page 0 show stats.