Have you tried benchmarking your code?
In reply to Re: perl or bash in cgi scripts? by marto in thread perl or bash in cgi scripts? by AlfaProject