Thanks for the pointers :)
I like your grep method far better. As for using the one here document I did that because I thought there were problems with quotes if I use the CGI.pm print $q->p("") method. In hindsight I'm sure there is a way around this (do I even need the quotes in the cgi print method?).
Update jarich pointed out a nice way to use CGI.pm to to print out the paragraphs. I've included that in the code now. |