Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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)

In reply to (jeffa) Re: Bull$#!^ Bingo by jeffa
in thread Bull$#!^ Bingo (was :By far, the coolest use for perl) by shirkdog_perl

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-25 16:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found