After seeing this one I thought I'd show/post my own version of it which was derived from a friends advice-generator:
#!/usr/local/bin/perl -w use CGI ":cgi"; use CGI::Carp "fatalsToBrowser"; @first = qw(Temporary Intermittant Partial Redundant Total Multiplexed + Inherent Duplicated Dual-Homed Synchronous Bidirectional Serial Asyn +chronous Multiple Replicated Non-Replicated Unregistered Non-Specific + Generic Migrated Localised Resignalled Dereferenced Nullified Abort +ed Serious Minor Major Extraneous Illegal Insufficient Viral Unsuppor +ted Outmoded Legacy Permanent Invalid Deprecated Virtual Unreportable + Undetermined Undiagnosable Unfiltered Static Dynamic Delayed Immedia +te Nonfatal Fatal Non-Valid Unvalidated Non-Static Unreplicatable Non +-Serious); @second = qw(Array Systems Hardware Software Firmware Backplane Logic- +Subsystem Integrity Subsystem Memory Comms Integrity Checksum Protoco +l Parity Bus Timing Synchronisation Topology Transmission Reception S +tack Framing Code Programming Peripheral Environmental Loading Operat +ion Parameter Syntax Initialisation Execution Resource Encryption Dec +ryption File Precondition Authentication Paging Swapfile Service Gate +way Request Proxy Media Registry Configuration Metadata Streaming Ret +rieval Installation Library Handler ); @third = qw(Interruption Destabilisation Destruction Desynchronisation + Failure Dereferencing Overflow Underflow NMI Interrupt Corruption An +omoly Seizure Override Reclock Rejection Invalidation Halt Exhaustion + Infection Incompatibility Timeout Termination Unavailability Bug Con +dition Crash Dump Crashdump Stackdump Problem Lockout); @fourth = qw(Error Problem Warning Signal Flag); print "Content-type: text/html\n\n"; print <<EOT; <html> <head> <title>BOFH Excuse Generator</title> </head> <body bgcolor="#000000" text="#DF0109" link="#DF0109" vlink="#9900 +33" alink="#FF6633"> <FONT face="lucida sans, footlight mt light, verdana, arial"> <h1 align="center">BOFH Excuse Generator.</h1> EOT if (!param()) { print <<EOT; <p align="center">Click refresh to see more advice!</p> <p align="center"><table bgcolor="#EEEEEE" border="1" cellpadd +ing="5"> <tr> <td align="center"> EOT if (rand(6) > 1) { print "<font size=\"5\">" . $first[rand(@first)] . " " . $second[r +and(@second)] . " " . $third[rand(@third)] . ".</font>\n"; } else { print "<font size=\"5\">" . $first[rand(@first)] . " " . $third[ra +nd(@third)] . " " . $third[rand(@third)] . " " . $fourth[rand(@fourth +)] . ".</font>\n"; } print <<EOT; </td> </tr> </table> <form action="bofh.cgi" method="post"> <input type="submit" name="list" value="List Words"><br><b +r> </form> EOT } elsif (param('list')) { print <<EOT; <p>List of words used to generate advice: <p align="center"><table bgcolor="#EEEEEE" border="1" cellpadding= +"5"> <tr> <td align="center" valign="top"> <font size="+1"><b>first</b></font><br> EOT for($i=0; $i<@first; $i++) { print "$first[$i]<br>\n"; } print <<EOT; </td> <td align="center" valign="top"> <font size="+1"><b>secondectives</b></font><br> EOT for($i=0; $i<@second; $i++) { print "$second[$i]<br>\n"; } print <<EOT; </td> <td align="center" valign="top"> <font size="+1"><b>third</b></font><br> EOT for($i=0; $i<@third; $i++) { print "$third[$i]<br>\n"; } print <<EOT; </td> <td align="center" valign="top"> <font size="+1"><b>fourth</b></font><br> EOT for($i=0; $i<@fourth; $i++) { print "$fourth[$i]<br>\n"; } $first = @first; $second = @second; $third = @third; $fourth = @fourth; print <<EOT; </td> </tr> <tr> <td align="center"> Total: $first </td> <td align="center"> Total: $second </td> <td align="center"> Total: $third </td> <td align="center"> Total: $fourth </td> </tr> </table> EOT } elsif (param('combo')) { $total = (@first*@second*@third)+(@first*@third*@second*@fourth); print <<EOT; <p>All possible combinations total $total. <p align="center"><table bgcolor="#EEEEEE" border="1" cellpadd +ing="5"> <tr> <td align="center" valign="top"> EOT for($i=0; $i<@first; $i++) { for($j=0; $j<@second; $j++) { for($k=0; $k<@third; $k++) { print "$first[$i] $second[$j] $third[$k]<br>\n"; } } } for($i=0; $i<@first; $i++) { for($j=0; $j<@second; $j++) { for($k=0; $k<@third; $k++) { for($l=0; $l<@fourth; $l++) { print "$first[$i] $second[$j] $third[$k] $fourth[$l]<br>\n +"; } } } } print <<EOT; </td> </tr> </table> EOT } print <<EOT; <p align="center">Copyright 2001 TheDarkCitadel</p> <p align="center">Derived From <a href="http://www.mrperson.or +g">Mr_Person's</a> Advice Generator</p> </body> </html> EOT
I left the 'combo' function in there as well just incase you ever want to use it (produces a rather large list) just add this button to the form:
<input type="submit" name="combo" value="List All Combinations">
. And yes the code isn't pretty :)

Replies are listed 'Best First'.
Re: BOFH Excuse Generator
by Abigail-II (Bishop) on Aug 05, 2003 at 21:56 UTC
    I prefer the simple:
    $ telnet bofh.jive.org 666

    instead of a web interface. However, what you did was done before, see http://www.cs.wisc.edu/~ballard/bofh/, which include a Perl CGI program.

    Not that any decent BOFH would use HTML to write excuses, let alone play font tricks.

    Abigail

      Only difference between the two, is my excuses are generated from the Offical Excuse Board whereas your's are BOFH-style Excuse. Not the real thing.