#!/usr/bin/perl -l

#                                                          ppg256-5.pl
# Perl Poetry Generator in 256 Characters, Number 5
# Nick Montfort nickm@nickm.com
#====================================================================#
#
# This is a reformatted and commented version of a Perl program that 
# will run on Mac and Linux on the command line and which is 256 
# characters long:
#
# perl -le '@d=split/ /,"eros won to tree for fire sex sever ate nice tin elfin wealth";@t=split//,"_bhlmnpstw";{$_=localtime;/(..):(.)(.):(.)(.)/;print"\n$t[$3]".($4%2)."ck $t[$4]".($3%2)."ck\n"if!$5;print"\\"x$5." $d[$1%12] $d[$2] $d[$3] $d[$4] $d[$5]";sleep 1;redo}'
#
# The only changes that have been made are the addition of spaces, 
# newlines, and a few comments.
#
# On Windows, install ActivePerl to be able to run this program.
# To run, change to the directory where this file is located and type
# at the command prompt:
#
# perl -l ppg256-6.pl

@d = split / /,"eros won to tree for fire sex sever ate nice tin elfin wealth";

@t = split //,"_bhlmnpstw";

{
  $_ = localtime;
  /(..):(.)(.):(.)(.)/;
  print "\n$t[$3]".($4%2)."ck $t[$4]".($3%2)."ck\n" if !$5;
  print "\\"x$5." $d[$1%12] $d[$2] $d[$3] $d[$4] $d[$5]";
  sleep 1;
  redo
}

