Use the following tutorial to display random qutoes on whatever site you would like!
Code
Code:
#!/usr/bin/perl -wT
#Setup Module Use
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
#Quotes Are Placed Here. Seperate by comma
my @quotes = ("Don't die today!",
"Why don't you fly",
"What's up?");
#Prints the Actual Quotes
print header;
my $quote = $quotes[int(rand($#quotes+1))];
print qq(<b>$quote</b>\n);
Notes
- This file must be chmodded to 0755 or higher.
- This file must be located in the "CGI-BIN".
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
That's a bad idea for a production CGI (one that you're not just testing). Showing errors to the outside can give hackers a lot of information about a script and a server. Make sure to take that line out for the real deal.
Here is a link to another random quote CGI in perl that's super simple to code (4 lines) and even easier to manage (plain text quotes, no code): http://sedition.com/perl/random-quote-cgi.html