Another side note on the above answers:
Why is $| used in the script you're looking at? It's a good idea to use it in any CGI script that is outputing a webpage. If the output buffered (no $|=1) then the delay can cause errors in the generated HTML or might just cause a timeout. It's always a good idea to prevent buffering in a CGI script that generates a webpage.
For a nice place to live in Portland, OR