Here's my first attempt at Perl Poetry, nuns and monks. It was quite an interesting, artistic challenge for me. Not to be like the magician who explains his tricks, but I tried to put multiple layers and multiple poems into this poem. For instance, the main print section contains a different poem from the poem it prints--yes, it does run and without errors. I also made my sub-routines into related Haiku. When reading it (preferably aloud), take some poetic license and round out the text when it reads awkwardly otherwise--for instance, replace "=" with "is" or "are", say the "at" for the @ character of arrays. But not "dollar sign" for the beginning of strings, of course. Also, almost no command is extraneous. For instance, I want you to say "my" when there is such a private variable declaration.
Okay! I'll stop explaining and let you read it and let you run it. Please let me know what you think.
#!/usr/bin/perl -w # Program: two_loves.pl my $Programmer = "Spenser"; # Starting out alone system("clear"); my ($me, $first, $alone); $alone = 0; $me = " and "; my $heart = "desire"; # My useless efforts while($alone) { my $life = "nothing"; my $time = "wasted"; } # Next came you, my joy my $joy = "you"; my $girl; my $good = 1; @love = ('you', 'me'); # Looked into our hearts if($heart eq "desire") { $joy = join("$me", @love); } # Our relationship developed quickly my $love = $joy; &dating($good); &romancing($you); &loving($you); &sex_with($you); # The result is, as always, # two poetic possibilities print qq| $Troubled Waters $Love\'s a $tear $lost sea: $Soothing $me $in$despair, $Touching $me $tenderly, $Comforting $me $warmly. --$Sadness is $love. |; # Dating Haiku #------------------------------ sub dating { my $date = 1; if($date < $good) { $tear = "cool"; $lost = "day"; } if($date == $good) { $tear = "warm"; $lost = "night"; } } # Romancing Haiku #-------------------------- sub romancing { if($you = 1) { $in = "cares"; $Sadness = "Joy"; $despair = "sing"; $Troubled = "Content"; } } # Loving Haiku #-------------------------- sub loving { if($you = 1) { $Soothing = "Comforting"; $Comforting = "Stimulating"; $Love = "Love"; } } # Sexual Haiku #------------------------ sub sex_with { if($you = 1) { $Touching = "sensual"; $tenderly = "seductive"; $warmly = "titilating"; } } print " -$Programmer \n\n\n"; # Having said enough, exit;
|
|---|