That code is longer and slower than it needs to be. All you need is:
Code:
#!/usr/bin/perl
print "Content-type: text/html\n\n";
@html = ('index.apricot.html',
'index.butter.html',
'index.garden.html',
'index.greek.html',
'index.maple.html',
'index.raspberry.html',
'index.strawberry.html',
'index.natural.html');
my $rand = $html[rand @html];
open (H, "</home/fba/beta.rachelsorganic.co.uk/$rand");
while (<H>) { print; }
close H;
That will work with any version of perl. If it doesn't you screwed up your perl installation.
Also you don't need the int in [int rand @html] seeing as you aren't dealing with an integer