Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://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":



  • 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 cooling their heels in the Monastery: (6)
As of 2024-03-19 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found