Hello,
This is a quick-and-dirty port of the Perl original to 2013-era Objective C. There may be mistakes and typos—if so, let me know. This is a "literal" translation, in that it tries to replicate the original, line-by-line. There are some places where a more Objective-C-ish construct could be used, but I've tried to keep it close as possible to the original. Hopefully that makes it easier to track down and debug any discrepancies between the output of this version and the original.
On most lines, I kept the original Perl as a comment, so you can see exactly where I went wrong if something is broken.
Happy Markdowning,
Ben Syverson
Chicago, 2013