http://www.perlmonks.org?node_id=263044

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.