Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

New billboards are getting attention in Arizona (and more recently all over the U.S.). The billboards are a simple white background with black text. No fine print or sponsoring organization is included. I have taken the list of all variations of the "God Speaks" billboards and created this.

#!/usr/bin/perl -w use strict; use Tk; my @data = <DATA>; chomp @data; my $main = MainWindow->new(-title => "God's Billboards"); my $form = $main->Frame()->pack(-side => 'top', -fill => 'both', -padx + => 5, -pady => 5); my $message = $form->Frame()->pack(-side => 'right', -fill => 'both', +-padx => 5, -pady => 5); my $message_val = $message->Text(-height => 3, -width => 40)->pack(-si +de => 'right'); my $buttons = $main->Frame()->pack(-side => 'bottom'); my $sendbutton = $buttons->Button(-text => 'Next', -command => \&Displ +ay)->pack(-side => 'top'); CenterWindow($main); Display(); # set text before entering MainLoop MainLoop(); sub CenterWindow { # Don't remember where I got this subroutine # Args: (0) window to center # (1) [optional] desired width # (2) [optional] desired height my ($window, $width, $height) = @_; $window->idletasks; $width = $window->reqwidth unless $width; $height = $window->reqheight unless $height; my $x = int(($window->screenwidth / 2) - ($width / 2)); my $y = int(($window->screenheight / 2) - ($height / 2)); $window->geometry($width . "x" . $height . "+" . $x . "+" . $y); } sub Next { my $quip = shift(@data); push(@data, $quip); $quip =~ s/\\n/\n/g; $quip .= "\n - God"; return $quip; } sub Display { $message_val->delete('0.0', 'end'); $message_val->insert('0.0', Next()); } __DATA__ Tell the kids I love them. Let's meet at my house Sunday before the\ngame. Keep using my name in vain,\nI'll make rush hour longer. What part of "Thou Shalt Not..."\ndidn't you understand? We need to talk. C'mon over and bring the kids. Have you read my #1 best seller?\nThere will be a test. That "Love Thy Neighbor" thing... \nI meant it. I love you and you and you and you\nand... Will the road you're on get you to my\nplace? Big bang theory, you've got to be\nkidding. My way is the highway. Need directions? You think it's hot here? Loved the wedding, invite me to the\nmarriage. Do you have any idea where you're going? Follow me. Don't make me come down there.


In reply to God's Billboards (777th Post) by Mr. Muskrat

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!
  • 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, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            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.
  • Log In?
    Username:
    Password:

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

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (9)
    As of 2014-12-25 06:15 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (159 votes), past polls