As threatened, blank verse code in perl. Assumes
use English; Also, doesn't work. For reals.

It doesn't even scan unless you say
The punctuation same as I do. More,
It doesn't function. Too, no references
To Christ-like allegorical conceits
Or even Gawain. But nonetheless it makes
Me laugh and isn't that what counts? Forthwith:

unless ( $this_var == $my_ref ) {
   while (my ($key, $value) = each( %my_hash }} )) {
      print TO_OUTPUT "$key is $ARG\n" and die;
   }
return undef if $this_var == 1;
Date: 2009-04-22 05:54 am (UTC)
A camel.
From: [personal profile] damned_colonial
See, I pronounce it: "unless dollar this underscore var equals dollar my underscore ref..."

How do *you* pronounce the first line? I can't get it to scan unless you pronounce the dollar sign on one var and not the other.

And I can't get the iambs to line up on the TO_OUTPUT filehandle.

And, um, syntax error; you need to close the unless's curly brace.

Yeah, I dunno why I'm critiquing, but there you have it.
Date: 2009-04-22 06:27 am (UTC)
Convicts in Sydney, being spoken to by a guard/soldier
From: [personal profile] damned_colonial
# the following scans (for me anyway) if you pronounce as follows:
# $ = "dollar"
# < = "is less than"
# \n = "newline"
# . = "dot"
# x = "ecks"
# ||= = "or equals"
# parens, semi-colons, commas, quote marks, #: silent
#
# It also actually runs and prints out 14 lines of iambic pentameter
# if you call it as: print write_a_poem(5)
# 

sub write_a_poem { # commented, somewhat
  my $metre = shift; # iambs
  my ($line, @poem, $max);
  $max ||= 14; # lines
  while ($line < $max) {
    my $this = (("iamb" . " ")
      x $metre) . "\n\n";
    sleep 1; use warnings; $line++;
    push @poem, $this or die;
  }
  return @poem; # and it actually works!
}
Date: 2009-04-22 06:38 am (UTC)
A camel.
From: [personal profile] damned_colonial
Pronounced as:

1 sub write a poem (commented, somewhat)
2 my dollar metre equals shift (iambs)
3 my dollar line, at pome, dollar max
4 dollar max or equals fourteen (lines)
5 while dollar line is less than dollar max
6 my dollar this equals iamb dot space
7 ecks dollar metre dot newline newline
8 sleep one; use warnings; dollar line plus plus.
9 push at poem dollar this or die.
10 return at poem (and it actually works)

Lines 4, 6, and 9 are a little wacky, iambically speaking, but hell, it compiles -- ship it!
Date: 2009-04-24 06:09 am (UTC)
Cat under a blanket. Text: "Cats are just little people with Fur and Fangs"
From: [personal profile] afuna
OMG the both of you.

Profile

Senora Sabasa Garcia, by Goya
jadelennox

Most Popular Tags