Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

(jeffa) Re: Bull$#!^ Bingo

by jeffa (Bishop)
on Dec 05, 2002 at 18:32 UTC ( [id://217845]=note: print w/replies, xml ) Need Help??


in reply to Bull$#!^ Bingo (was :By far, the coolest use for perl)

I think that merlyn's CGI.pm solution looks more consise, but here is another version anyway ... it uses HTML::Template:
use CGI qw(header); use HTML::Template; my @array = ( "Synergy", "Strategic fit", "Core competencies", "Out of the box", "Bottom line", "Revisit", "Take that off line", "24/7", "Out of the loop", "Benchmark", "Value-added", "Proactive", "Win-win", "Think out side the box", "Fast track", "Result driven", "Empower (ment)", "Knowledge base", "At the end of the day", "Touch base", "Mindset", "Client focus (ed)", "Ballpark", "Game plan", "Leverage", "Top down", "User friendly", "On time", "Within budget", "Forecast", "Optimistic", ); my $html = do {local $/;<DATA>}; my $tmpl = HTML::Template->new(scalarref => \$html); # double map borrowed from merlyn and slightly altered $tmpl->param( row => [ map {{ col => [ map { { data => splice(@array, rand scalar @array, 1) } } 1..5 ] }} 1..5 ] ); print header, $tmpl->output; __DATA__ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Bullshit Bingo</title> </head> <body> <table cellpadding="10" border="2" cellspacing="0"> <tmpl_loop row> <tr> <tmpl_loop col> <td align="center"><tmpl_var data></td> </tmpl_loop> </tr> </tmpl_loop> </table> </body> </html>

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://217845]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-04-20 01:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found