R
Robert
Hi,
I have a small piece of code where perl reads an .HTM file and displays it
in your browser:
#!/usr/bin/perl
use CGI qwstandard);
use CGI::Carp qw(fatalsToBrowser);
use strict;
open (FH, "<page.htm") or die &error;
my @page = <FH>;
close(FH);
print "Content-type: text/html \n\n";
print @page;
exit;
This works totally fine.
The problem is now we are working with .MHTML files. Using the code above,
when trying to open and display a MHTML file, the contents of the file's
source is displayed instead of a formatted page. MHTML files define the
Content-type within the file itself at the top and use multipart/related. I
tried modifying my code above to that content-type but that didnt work. I'm
hoping maybe someone has a suggestion on how I can make this work. Many
thanx in advance.
Robert
I have a small piece of code where perl reads an .HTM file and displays it
in your browser:
#!/usr/bin/perl
use CGI qwstandard);
use CGI::Carp qw(fatalsToBrowser);
use strict;
open (FH, "<page.htm") or die &error;
my @page = <FH>;
close(FH);
print "Content-type: text/html \n\n";
print @page;
exit;
This works totally fine.
The problem is now we are working with .MHTML files. Using the code above,
when trying to open and display a MHTML file, the contents of the file's
source is displayed instead of a formatted page. MHTML files define the
Content-type within the file itself at the top and use multipart/related. I
tried modifying my code above to that content-type but that didnt work. I'm
hoping maybe someone has a suggestion on how I can make this work. Many
thanx in advance.
Robert