problem perl code: uploading .rtf files
$ppc='pphold/pp' . $cap;
open (DTION, ">","$ppc") or die "$!";
#binmode DTION;
while ($chunk=read ($cap, $data, 1024)) {
print DTION $data;
}
close DTION;
and I get this mess when displaying uploaded rtf file
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 Can we eat here
\par Pretty please mama\par }
the original rtf file uploaded looks like this:
Can we eat here<br />
Pretty please mama
perl particulars:
#!/usr/bin/perl -w
use CGI ':standard';
use DBI;
print "Content-type: text/html\n\n";
$ppc='pphold/pp' . $cap;
open (DTION, ">","$ppc") or die "$!";
#binmode DTION;
while ($chunk=read ($cap, $data, 1024)) {
print DTION $data;
}
close DTION;
and I get this mess when displaying uploaded rtf file
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 Can we eat here
\par Pretty please mama\par }
the original rtf file uploaded looks like this:
Can we eat here<br />
Pretty please mama
perl particulars:
#!/usr/bin/perl -w
use CGI ':standard';
use DBI;
print "Content-type: text/html\n\n";