Dear Chris,
> $xml =~ s/chr(145)/'/g;
> $xml =~ s/chr(146)/'/g;
> $xml =~ s/chr(147)/"/g;
> $xml =~ s/chr(148)/"/g;
Would this work for you?
----------------------\/--------BEGIN---------\/----------------------
warn "WARNING: UNTESTED CODE";
my %map = (
chr(145) => q.'.,
chr(146) => q.'.,
chr(147) => q.".,
chr(148) => q.".,
);
my $keys = join '|', keys %map;
$xml =~ s/($keys)/$map{$1}/g;
----------------------/\---------END----------/\----------------------
I was actually hoping the following would work, but no DWIMmery here. :-(
----------------------\/--------BEGIN---------\/----------------------
warn "WARNING: THIS CODE DOES NOT WORK AS INTENDED";
my $LHS = chr(145).chr(146).chr(147).chr(148);
$xml =~ y/$LHS/2345/;
----------------------/\---------END----------/\----------------------
peace, || Udayachal: a newspaper edited by slum children:
--{kr.pA} || http://tinyurl.com/57jaf
--
This .sig intentionally left blank.
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm