After yesterday's ( June 28, 2001 ) rather busy day at Slashdot with a number of common themed stories being hit on , I commented in the CB that I was just this far away from winning a fictional Slashdot bingo game...

Well, now you too can play Slashdot bingo with your friends! Simply run this script, which generates an HTML page, any number of times, and the first one to get 5 in a row (horizontal, vertical or diagonal) wins! The code is generic enough that you can change the data out with any other similar site and enjoy bingo in that form as well.

#!/usr/bin/perl -w use strict; use CGI qw(:all); use Algorithm::Numerical::Shuffle qw(shuffle); my @items = <DATA>; die "Need at least 24 items" if @items < 24; @items = shuffle @items; print header("text/html"), start_html(-title=>"Slashdot Bingo!"), table( { -align=>"center", -border=>1, -frame=>"border", -rules= +>"all" }, Tr( {-align=>"center", -valign=>"middle", -height=>"100" }, [ td( { -width=>"100" }, [ map { pop @items } (1..5) ] ), td( { -width=>"100" }, [ map { pop @items } (1..5) ] ), td( { -width=>"100" }, [ pop @items, pop @items, big(b("FREE")), pop @items, pop @items ] ), td( { -width=>"100" }, [ map { pop @items } (1..5) ] ), td( { -width=>"100" }, [ map { pop @items } (1..5) ] ) ] ) ), end_html, "\n"; __DATA__ Jon Katz article Microsoft FUD Microsoft vs DOJ Napster DeCSS Anime Movie Review ICANN Frivolious Patents Rambus KDE vs GNOME Linux Kernel Update GPL Ask Slashdot (on frontpage) Science (on frontpage) Apple Computers Microsoft .NET Book Review BSD (on frontpage) Console Games AOL IANAL Privacy (on frontpage) Your Rights Online (on frontpage) Doubleclick & Friends Star Wars Distributed Computing

Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain

In reply to Slashdot Bingo! by Masem

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.