more useful options | |
PerlMonks |
General question about a haiku programby telemachus (Friar) |
on May 06, 2008 at 00:05 UTC ( [id://684785]=perlquestion: print w/replies, xml ) | Need Help?? |
telemachus has asked for the wisdom of the Perl Monks concerning the following question:
Hi, Monks. I've written a small program to print out haikus from a shell, and although the program works I have this vague sense that it could be better. So my question (I think) is more along the lines of "How could this be better? (more efficient? more Perlish?)" than "How do I do this?" Just to clarify the idea: the program is like fortune, but much simpler. The user types haiku at a prompt and is rewarded with a (pseudo-)randomly selected three-line poem and its author. Here's my version:
The real version has just over 80 haikus, but I figure we all get the point. (Though I'm happy to post the whole thing on my scratchpad, if anyone wants to play with the poems and avoid typing them.) So I'm curious: is there some much better way to do it?
Back to
Seekers of Perl Wisdom
|
|