The Nymph's Reply
#!/usr/bin/env perl
# filename: nymphs_reply.pl
# description: sir walter raleigh's "the nymph's reply to the shepherd"
# translated from english into perl
# license: perl artistic license (https://dev.perl.org/licenses/artistic.html)
# created: before 1599, sir walter raleigh (wraleigh)
# original: https://www.poetryfoundation.org/poems/44939/the-nymphs-reply-to-the-shepherd
# modified: 02.14.2012, william fielder (wfielder)
# modified: 01.01.2023, william fielder (wfielder)
# bug tracker: (cmarlowe) successful exit conditions will never be met
# bug closed: (wraleigh) nofix, working as designed
# === pragmas and globals === #
use File::Copy;
use strict;
use warnings;
my $world_and_love = 1000; # vast untold eons
my $shepherds_tongue = 0; # what a guy
my $rocks = 300; # warm, degrees kelvin
my $philomel = 100; # iq, smart bird
my $youth = 0; # wasted on the young
my $rivers = "with more then flinty rage"; # apologies to thom
my $folly = "the riper should by time decease"; # apologies to will
my $season = "rotten apple from the hoard"; # apologies to geoff
my @items = ("gowns", "shoes", "roses", "cap", "kirtle", "posies");
my @accessories = ("belt of straw", "ivy buds", "coral clasps", "amber studs");
my @joys = ("date", "age", "need");
# === subroutines === #
sub TickTock
{
my $time = localtime();
if (-e "/field/flocks" ) {
move("/field/flocks", "/field/fold") or die("cannnot move, $!\n");
}
print("\n$time\n\n");
}
# === main === #
if (($world_and_love lt 8) and ($shepherds_tongue)) {
move("/me/pretty_pleasures", "/thee/thy_love") or die("cannot move, $!\n");
exit 0;
}
TickTock();
while (($rivers =~ m/rage/) and ($rocks gt 200)) {
$rocks -= 128;
$philomel -= 32;
push(my @the_rest, ("cares")) or warn("cares: complain\n\n");
}
undef(my $flowers);
my $wanton_fields = "wayward winter reckoning";
my @sorrows_fall = my @fancys_spring = ("honey tongue", "heart of gall");
if (($folly =~ m/ripe/) and ($season =~ m/rotten/)) {
foreach my $item (@items) {
undef($item);
}
}
unless (@accessories) {
move("/me/to_come", "/thee/thy_love") or die("cannot move, $!\n");
exit 0;
}
if (($youth) and (-e "/thee/thy_love")) {
unless (@joys) {
move("/me/delights", "/thee/thy_love") or die("cannot move, $!\n");
exit 0;
}
}
exit 1;
# eof
Comments 0
Please log in to leave a comment.