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)