change "IBM & Microsoft" into "IBM & Microsoft"?
i assume you mean change "IBM & Microsoft" into "IBM & Microsoft", or even &.
if you know the codes of the chars you want to change, you can do something like the following:
my %ent=
(
"&" => 38,
"<" => 60,
">" => 62,
#...
);
$string = "IBM & Microsoft > Sun\n";
print $string;
for ( keys %ent ) { $string =~ s/$_/&#$ent{$_};/g }
print $string;
#prints IBM & Microsoft > Sun
Another option is to put the string in question into a
<![CDATA[...]]>-section.