A
Art Werschulz
Hi.
# Article reposted ... I cancelled it when I thought I had figured out
# the answer ...
I have moved from a Solaris box (running perl 5.6.0) to an Intel Linux
box (running perl 5.8.0).
I have a script that processes msgs I get from certain mailing lists
(which procmail kindly puts into files for me). It wordwraps the msgs
(since some of them have ridiculously long lines) and replaces certain
encoded chars by their plain text equivalents. It looks like this
%<------%<--%<--%<---cut here---%<--%<--%<----------------------------
use Text::Wrap;
$Text::Wrap::columns = 79;
while (<>) {
s/\c]/\"/g;
s/\cA//g;
s/\cS/--/g;
s/\cY/\'/g;
s/=$//;
s/=20//;
s/=85/.../g;
s/=91/\'/g;
s/=92/\'/g;
s/=93/\"/g;
s/=94/\"/g;
s/=96/--/g;
s/\205/.../g;
s/\221/\'/g;
s/\222/\'/g;
s/\223/\"/g;
s/\224/\"/g;
s/\226/--/g;
s/\227/.../g;
s/\255/--/g;
$_ = wrap("", "", $_) unless /^[^\s]+:\s/;
print $_;
}
%<------%<--%<--%<---cut here---%<--%<--%<----------------------------
I want blank lines to remain in the text. When running this script on
the Solaris box, the blank lines are maintained. However, they
disappear if I run this script on the Linux box.
Why the difference between these platforms? Has something changed
between versions 5.6 and 5.8?
I would appreciate suggestions for making this work on the Linux box.
Thanks.
# Article reposted ... I cancelled it when I thought I had figured out
# the answer ...
I have moved from a Solaris box (running perl 5.6.0) to an Intel Linux
box (running perl 5.8.0).
I have a script that processes msgs I get from certain mailing lists
(which procmail kindly puts into files for me). It wordwraps the msgs
(since some of them have ridiculously long lines) and replaces certain
encoded chars by their plain text equivalents. It looks like this
%<------%<--%<--%<---cut here---%<--%<--%<----------------------------
use Text::Wrap;
$Text::Wrap::columns = 79;
while (<>) {
s/\c]/\"/g;
s/\cA//g;
s/\cS/--/g;
s/\cY/\'/g;
s/=$//;
s/=20//;
s/=85/.../g;
s/=91/\'/g;
s/=92/\'/g;
s/=93/\"/g;
s/=94/\"/g;
s/=96/--/g;
s/\205/.../g;
s/\221/\'/g;
s/\222/\'/g;
s/\223/\"/g;
s/\224/\"/g;
s/\226/--/g;
s/\227/.../g;
s/\255/--/g;
$_ = wrap("", "", $_) unless /^[^\s]+:\s/;
print $_;
}
%<------%<--%<--%<---cut here---%<--%<--%<----------------------------
I want blank lines to remain in the text. When running this script on
the Solaris box, the blank lines are maintained. However, they
disappear if I run this script on the Linux box.
Why the difference between these platforms? Has something changed
between versions 5.6 and 5.8?
I would appreciate suggestions for making this work on the Linux box.
Thanks.