#!/usr/bin/perl -w
use strict;

=README

   This code outputs an XHTMLl 1.0 tag pointing to a stylesheet which
   is randomly selected from a list of different stylesheets.

      Tommy Butler - 2/10/03, for "Terry Johnson"

   This program is free software, you may redistribute and/or modify it under
   the terms of the GNU GPL. <URL: http://www.gnu.org/licenses/gpl.txt>

=cut

# Type in the file names of your style sheets between the parenthesis, each on
# its own line.  Add new lines as necessary.  See NOTE* below!
my(@styles) = qw(
http://www.foo.com/sytles/stylesheet_1.css
http://www.foo.com/sytles/stylesheet_2.css
http://www.foo.com/sytles/stylesheet_3.css
/styles/stylesheet_A.css
/styles/stylesheet_B.css
/styles/stylesheet_C.css
);

# uncomment the next line if you want to use this as an SSI script
# print qq[Content-Type: text/html; charset=ISO-8859-1\012\012];

# print out random stylesheet html tag
print &style( $styles[ int rand scalar @styles ] );

# wraps the randomly selected stylesheet name in an html tag
sub style { qq[<link rel="stylesheet" type="text/css" href="$_[0]" />\012] }

# *NOTE
# You should type the file paths for your stylesheets the same way you would
# in your web pages.  (eg- these shouldn't be system paths on your server, but
# the paths you use for your website.)  Any number of stylesheets is supported.
# You aren't limited to three.