Earl: I've installed 2.02a2 on an HP9000 700 series, and run into a couple
of problems you may want to know about. I have hacked 'mhonarc', and it
works OK, but I don't speak perl
I am using perl 4.036
The problem is some of the code is not legal Perl 4.
The error I encountered was
error on MHonArc 2.02 alpha 2
jzedward(_at_)cnossos $ mhonarc /usr/mail/jzedward
syntax error in file /usr/local/bin/mhonarc at line 1518, next 2 tokens
"@array2
= split(/$X/o, $Derived{$index})"
(Might be a runaway multi-line {} string starting on line 1516)
...
I commented lines 1515-1529 approx as
## Set modification times -- Use eval incase OS does not support utime.
# commented out by JZE because of errors
# if ($MODTIME && !$SINGLE) {
# eval q{
# $tmp = &get_time_from_index($index);
# @array2 = split(/$X/o, $Derived{$index});
# grep($_ = $OUTDIR . $DIRSEP . $_, @array2);
# unshift(@array2, $filepathname);
# utime($tmp, $tmp, @array2);
# };
# }
# ($i_p0, $filename);
}
Changing the delimiters used by the q// operator should fix the
problem. In the "eval" the q// uses "{}" to delimit the string
for eval. However, Perl 4 improperly terminates the string when
a '}' is encountered in the split() function.
Try something like "eval q% ... %".
I also had to comment a section of mhtxtplain.pl as follows
## Convert data according to charset
if (!$asis{$charset}) {
## Japanese message
if ($charset =~ /iso-2022-jp/i) {
return (&jp2022(*data));
## Latin 2-6, Greek, Hebrew, Arabic
#} elsif ($charset =~ /iso-8859-([2-9]|10)/i) {
#$data = iso_8859'str2sgml($data, $charset);
----------------------^
Just insert the '&' character here. Perl 5 does not require
the '&' for invoking subroutines, but Perl 4 does. Hence I did not
notice the problem since I have been using Perl 5.
--ewh