in reply to General question about a haiku program

Bit like mscharrer's, this approach can handle a very large set of records pretty efficiently.

$/ = "\n\n"; rand($.) < 1 && ($haiku = $_) while <DATA>; $haiku =~ s/\s+\z//; # instead of chomp, accounts for uneven final \n print $haiku, "\n"; __DATA__ Even in Kyoto hearing the cuckoo's cry-- I long for Kyoto. Basho In the white plum blossoms night to next day just turning. Buson

Other advantage is it's basically WYSIWYG.