in reply to General question about a haiku program

Instead of separating the lines of the poem (and the author) by colons, separate them with \n\t.

This way, you can replace

my ($line1, $line2, $line3, $author) = split ":", $poems{$number}; print " $line1\n$line2\n $line3\n\t$author\n";
with
print " ",$poems{$number},"\n";