1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Perl Poetry</title>
<link rel="shortcut icon" type="image/gif" href="/favicon.ico" />
<link rel="stylesheet" href="../style.css" />
<link rel="stylesheet" href="style-override.css" />
</head>
<body>
<p class="header">
<a href="https://foo.zone">Home</a> | <a href="https://codeberg.org/snonux/foo.zone/src/branch/content-md/gemfeed/2008-06-26-perl-poetry.md">Markdown</a> | <a href="gemini://foo.zone/gemfeed/2008-06-26-perl-poetry.gmi">Gemini</a>
</p>
<h1 style='display: inline' id='perl-poetry'>Perl Poetry</h1><br />
<br />
<span class='quote'>Published at 2008-06-26T21:43:51+01:00; Updated at 2021-05-04</span><br />
<br />
<span>Here are some Perl Poems I wrote. They don't do anything useful when you run them, but they don't produce a compiler error either. They only exist for fun and demonstrate what you can do with Perl syntax.</span><br />
<br />
<span>Wikipedia: "Perl poetry is the practice of writing poems that can be compiled as legal Perl code, for example the piece known as Black Perl. Perl poetry is made possible by the large number of English words that are used in the Perl language. New poems are regularly submitted to the community at PerlMonks."</span><br />
<br />
<a class='textlink' href='https://en.wikipedia.org/wiki/Perl'>https://en.wikipedia.org/wiki/Perl</a><br />
<br />
<pre>
'\|/' *
-- * -----
/|\ ____
' | ' {_ o^> *
: -_ /)
: ( ( .-''`'.
. \ \ / \
. \ \ / \
\ `-' `'.
\ . ' / `.
\ ( \ ) ( .')
,, t '. | / | (
'|``_/^\___ '| |`'-..-'| ( ()
_~~|~/_|_|__/|~~~~~~~ | / ~~~~~ | | ~~~~~~~~
-_ |L[|]L|/ | |\ MJP ) )
( |( / /|
~~ ~ ~ ~~~~ | /\\ / /| |
|| \\ _/ / | |
~ ~ ~~~ _|| (_/ (___)_| |Nov291999
(__) (____)
</pre>
<br />
<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br />
<br />
<ul>
<li><a href='#perl-poetry'>Perl Poetry</a></li>
<li>⇢ <a href='#mathpl'>math.pl</a></li>
<li>⇢ <a href='#christmaspl'>christmas.pl</a></li>
<li>⇢ <a href='#shoppingpl'>shopping.pl</a></li>
<li>⇢ <a href='#more'>More...</a></li>
</ul><br />
<h2 style='display: inline' id='mathpl'>math.pl</h2><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><i><font color="silver">#!/usr/bin/perl</font></i>
<i><font color="silver"># (C) 2006 by Paul C. Buetow</font></i>
<b><u><font color="#000000">goto</font></u></b> library <b><u><font color="#000000">for</font></u></b> study $math;
BEGIN { <b><u><font color="#000000">s</font></u></b><font color="#808080">/earching/ books/</font>
<b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">read</font></u></b> $them, $at, $the } library:
<b><u><font color="#000000">our</font></u></b> $topics, <b><u><font color="#000000">cos</font></u></b> <b><u><font color="#000000">and</font></u></b> tan,
<b><u><font color="#000000">require</font></u></b> strict; <b><u><font color="#000000">import</font></u></b> { of, <b><u><font color="#000000">tied</font></u></b> $patience };
<b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">int</font></u></b><font color="#808080">'egrate'</font>; <b><u><font color="#000000">sub</font></u></b> trade; };
<b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">exp</font></u></b><font color="#808080">'onentize'</font> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">abs</font></u></b><font color="#808080">'olutize'</font> };
study <b><u><font color="#000000">and</font></u></b> study <b><u><font color="#000000">and</font></u></b> study <b><u><font color="#000000">and</font></u></b> study;
<b><u><font color="#000000">foreach</font></u></b> $topic ({of, math}) {
you, <b><u><font color="#000000">m</font></u></b>/ay /go, to, limits }
<b><u><font color="#000000">do</font></u></b> { not <b><u><font color="#000000">qw</font></u></b><font color="#808080">/erk /</font> <b><u><font color="#000000">unless</font></u></b> $success
<b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">m</font></u></b>/ove /o;$n <b><u><font color="#000000">and</font></u></b> study };
<b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">int</font></u></b><font color="#808080">'egrate'</font>; <b><u><font color="#000000">sub</font></u></b> trade; };
<b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">exp</font></u></b><font color="#808080">'onentize'</font> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">abs</font></u></b><font color="#808080">'olutize'</font> };
study <b><u><font color="#000000">and</font></u></b> study <b><u><font color="#000000">and</font></u></b> study <b><u><font color="#000000">and</font></u></b> study;
<b><u><font color="#000000">grep</font></u></b> <font color="#808080">/all/</font>, <b><u><font color="#000000">exp</font></u></b><font color="#808080">'onents'</font> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">cos</font></u></b><font color="#808080">'inuses'</font>;
<font color="#808080">/seek results/</font> <b><u><font color="#000000">for</font></u></b> @all, <b><u><font color="#000000">log</font></u></b><font color="#808080">'4rithms'</font>;
<font color="#808080">'you'</font> =~ <b><u><font color="#000000">m</font></u></b>/ay /go, not home
<b><u><font color="#000000">unless</font></u></b> <b><u><font color="#000000">each</font></u></b> %book ne<i><font color="silver">#ars</font></i>
$completion;
<b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">int</font></u></b><font color="#808080">'egrate'</font>; <b><u><font color="#000000">sub</font></u></b> trade; };
<b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">exp</font></u></b><font color="#808080">'onentize'</font> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">abs</font></u></b><font color="#808080">'olutize'</font> };
<i><font color="silver">#at</font></i>
home: <font color="#808080">//ig,'nore', time and sleep $very =~ s/tr/on/</font><b><u><font color="#000000">g</font></u></b>;
__END__
</pre>
<br />
<h2 style='display: inline' id='christmaspl'>christmas.pl</h2><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><i><font color="silver">#!/usr/bin/perl</font></i>
<i><font color="silver"># (C) 2006 by Paul C. Buetow</font></i>
Christmas:{time;<i><font color="silver">#!!!</font></i>
Children: <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">tell</font></u></b> $wishes;
Santa: <b><u><font color="#000000">for</font></u></b> $each (@children) {
BEGIN { <b><u><font color="#000000">read</font></u></b> $each, $their, wishes <b><u><font color="#000000">and</font></u></b> study them; <b><u><font color="#000000">use</font></u></b> Memoize<i><font color="silver">#ing</font></i>
} <b><u><font color="#000000">use</font></u></b> constant gift, <font color="#808080">'wrapping'</font>;
<b><u><font color="#000000">package</font></u></b> Gifts; <b><u><font color="#000000">pack</font></u></b> $each, gift <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">bless</font></u></b> $each <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">goto</font></u></b> deliver
or <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">import</font></u></b> <b><u><font color="#000000">if</font></u></b> not <b><u><font color="#000000">local</font></u></b> $available,!!! HO, HO, HO;
<b><u><font color="#000000">redo</font></u></b> Santa, <b><u><font color="#000000">pipe</font></u></b> $gifts, to_childs;
<b><u><font color="#000000">redo</font></u></b> Santa <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">return</font></u></b> <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">last</font></u></b> one, is, delivered;
deliver: gift <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">require</font></u></b> diagnostics <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">our</font></u></b> $gifts ,not break;
<b><u><font color="#000000">do</font></u></b>{ <b><u><font color="#000000">use</font></u></b> NEXT; time; <b><u><font color="#000000">tied</font></u></b> $gifts} <b><u><font color="#000000">if</font></u></b> broken <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">dump</font></u></b> the, broken, ones;
The_children: <b><u><font color="#000000">sleep</font></u></b> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">wait</font></u></b> <b><u><font color="#000000">for</font></u></b> (<b><u><font color="#000000">each</font></u></b> %gift) <b><u><font color="#000000">and</font></u></b> try { to => <b><u><font color="#000000">untie</font></u></b> $gifts };
<b><u><font color="#000000">redo</font></u></b> Santa, <b><u><font color="#000000">pipe</font></u></b> $gifts, to_childs;
<b><u><font color="#000000">redo</font></u></b> Santa <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">return</font></u></b> <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">last</font></u></b> one, is, delivered;
The_christmas_tree: formline <b><u><font color="#000000">s</font></u></b><font color="#808080">/ /childrens/</font>, $gifts;
<b><u><font color="#000000">alarm</font></u></b> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">warn</font></u></b> <b><u><font color="#000000">if</font></u></b> not <b><u><font color="#000000">exists</font></u></b> $Christmas{ tree}, @t, $ENV{HOME};
<b><u><font color="#000000">write</font></u></b> <<EMail
to the parents to buy a new christmas tree!!!!<font color="#000000">111</font>
<b><u><font color="#000000">and</font></u></b> send the
EMail
;<b><u><font color="#000000">wait</font></u></b> <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">redo</font></u></b> deliver until <b><u><font color="#000000">defined</font></u></b> <b><u><font color="#000000">local</font></u></b> $tree;
<b><u><font color="#000000">redo</font></u></b> Santa, <b><u><font color="#000000">pipe</font></u></b> $gifts, to_childs;
<b><u><font color="#000000">redo</font></u></b> Santa <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">return</font></u></b> <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">last</font></u></b> one, is, delivered ;}
END {} <b><u><font color="#000000">our</font></u></b> $mission <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">sleep</font></u></b> until <b><u><font color="#000000">next</font></u></b> Christmas ;}
__END__
This is perl, v5.<font color="#000000">8.8</font> built <b><u><font color="#000000">for</font></u></b> i386-freebsd-64int
</pre>
<br />
<h2 style='display: inline' id='shoppingpl'>shopping.pl</h2><br />
<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><i><font color="silver">#!/usr/bin/perl</font></i>
<i><font color="silver"># (C) 2007 by Paul C. Buetow</font></i>
BEGIN{} <b><u><font color="#000000">goto</font></u></b> mall <b><u><font color="#000000">for</font></u></b> $shopping;
<b><u><font color="#000000">m</font></u></b>/y/; mall: <b><u><font color="#000000">seek</font></u></b>$s, cool products(), { to => $sell };
<b><u><font color="#000000">for</font></u></b> $their (@business) { to:; earn:; a:; lot:; of:; money: }
<b><u><font color="#000000">do</font></u></b> not <b><u><font color="#000000">goto</font></u></b> home <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">exit</font></u></b> mall <b><u><font color="#000000">if</font></u></b> <b><u><font color="#000000">exists</font></u></b> $new{product};
<b><u><font color="#000000">foreach</font></u></b> $of (<b><u><font color="#000000">q</font></u></b><font color="#808080">(uality rich products)</font>){} <b><u><font color="#000000">package</font></u></b> products;
<b><u><font color="#000000">our</font></u></b> $news; <b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">tell</font></u></b> cool products() <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b>{ <b><u><font color="#000000">sub</font></u></b><i><font color="silver">#tract</font></i>
cool{ $products <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">shift</font></u></b> @the, @bad, @ones;
<b><u><font color="#000000">do</font></u></b> <b><u><font color="#000000">bless</font></u></b> [<b><u><font color="#000000">q</font></u></b><font color="#808080">(uality)</font>], $products
<b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">return</font></u></b> not <b><u><font color="#000000">undef</font></u></b> $stuff <b><u><font color="#000000">if</font></u></b> not (<b><u><font color="#000000">local</font></u></b> $available) }};
<b><u><font color="#000000">do</font></u></b> { study <b><u><font color="#000000">and</font></u></b> study <b><u><font color="#000000">and</font></u></b> study <b><u><font color="#000000">for</font></u></b> cool products() }
<b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">seek</font></u></b> $all, cool products(), { to => $buy } };
<b><u><font color="#000000">do</font></u></b> { <b><u><font color="#000000">write</font></u></b> $them, $down } <b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">do</font></u></b> { order: <b><u><font color="#000000">foreach</font></u></b> (@case) { <b><u><font color="#000000">package</font></u></b> <b><u><font color="#000000">s</font></u></b> } };
<b><u><font color="#000000">goto</font></u></b> home <b><u><font color="#000000">if</font></u></b> not <b><u><font color="#000000">exists</font></u></b> $more{money} or <b><u><font color="#000000">die</font></u></b> <b><u><font color="#000000">q</font></u></b><font color="#808080">(uerying)</font> ;<b><u><font color="#000000">for</font></u></b>( @money){};
at:;home: <b><u><font color="#000000">do</font></u></b> { END{} <b><u><font color="#000000">and</font></u></b>:; rest:; a:; bit: <b><u><font color="#000000">exit</font></u></b> $shopping }
<b><u><font color="#000000">and</font></u></b> <b><u><font color="#000000">sleep</font></u></b> until <b><u><font color="#000000">unpack</font></u></b>$ing, cool products();
__END__
This is perl, v5.<font color="#000000">8.8</font> built <b><u><font color="#000000">for</font></u></b> i386-freebsd-64int
</pre>
<br />
<h2 style='display: inline' id='more'>More...</h2><br />
<br />
<span>Did you like what you saw? Have a look at Codeberg to see my other poems too:</span><br />
<br />
<a class='textlink' href='https://codeberg.org/snonux/perl-poetry'>https://codeberg.org/snonux/perl-poetry</a><br />
<br />
<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br />
<br />
<span>Other related posts are:</span><br />
<br />
<a class='textlink' href='./2026-02-15-loadbars-resurrected-from-perl-to-go.html'>2026-02-15 Loadbars resurrected: From Perl to Go after 15 years</a><br />
<a class='textlink' href='./2025-11-02-perl-new-features-and-foostats.html'>2025-11-02 Perl New Features and Foostats</a><br />
<a class='textlink' href='./2022-05-27-perl-is-still-a-great-choice.html'>2022-05-27 Perl is still a great choice</a><br />
<a class='textlink' href='./2011-05-07-perl-daemon-service-framework.html'>2011-05-07 Perl Daemon (Service Framework)</a><br />
<a class='textlink' href='./2008-06-26-perl-poetry.html'>2008-06-26 Perl Poetry (You are currently reading this)</a><br />
<br />
<a class='textlink' href='../'>Back to the main site</a><br />
<p class="footer">
Generated with <a href="https://codeberg.org/snonux/gemtexter">Gemtexter 3.0.1-develop</a> |
served by <a href="https://www.OpenBSD.org">OpenBSD</a>/<a href="https://man.openbsd.org/relayd.8">relayd(8)</a>+<a href="https://man.openbsd.org/httpd.8">httpd(8)</a> |
<a href="https://foo.zone/site-mirrors.html">Site Mirrors</a>
<br />
Webring: <a href="https://shring.sh/foo.zone/previous">previous</a> | <a href="https://shring.sh">shring</a> | <a href="https://shring.sh/foo.zone/next">next</a>
</p>
</body>
</html>
|