my $filename = "/cache/some/file.html"; open(OUT,$filename) || errout(); while() { print ; } close(OUT);