in reply to Printing file to browser

Altho this probably won't fix your problem... here's a good tip :

open (FILE, "<htmlcal.txt") || die $!;

Ok, so ppl already mentioned die... but it's also pretty nice to define an access mode. When (and you really shouldn't) you read a filename in from user input, you already avoiding pipe abuse.
This issue is discussed in more depth in RFP's Perl CGI Problems

Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.