in reply to cgi programming problem with perl

In the while the current line (i.e. record) gets assigned to $_, while in the foreach you read all lines (i.e. records) at once. I don't think that's what you really want. Leaving out the foreach and splitting $_ rather than $record seems more like it.

However, this probably has nothing to do with your problem. In the code you show I don't see a HTTP header printed (print $cgi->header();. Omitting a header may cause the fact that nothing seems to show up in the browser.

Hope this helps, -gjb-