in reply to Printing file to browser

Another method would be to set the "input record separator" ($/).
undef $/; open (FILE, 'htmlcal.txt'); print "Content-Type: text/html\n\n"; print "What the f***?"; print <FILE>; close FILE;
This will effectivly make the entire file one record. So using <> in the scalar context will return the entire file.

I just used this today by chance.

- FrankG