----- Original Message -----
From: "Stout, Joel R" <[EMAIL PROTECTED]>
To: "John" <[EMAIL PROTECTED]>; "Perl Beginners" <[email protected]>
Sent: Thursday, February 03, 2005 8:17 PM
Subject: RE: replacing special chars
> Try this, and remember - with XML there are more than one you have to
> change:
>
> sub xc {
> #returns text free of XML baddies - xc = xml clean
> my $data = $_[0];
> $data =~ s/&/&/g;
> $data =~ s/</</g;
> $data =~ s/>/>/g;
> $data =~ s/'/'/g;
> $data =~ s/"/"/g;
> return $data;
> }
>
> -----Original Message-----
> From: John [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 03, 2005 9:36 AM
> To: Perl Beginners
> Subject: replacing special chars
>
> Hello to all
>
> I want to replace the & with the &
>
> I use the command s/\&/\&/; with no luck
>
> Does anybody know what am i missing here?
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> <http://learn.perl.org/> <http://learn.perl.org/first-response>
>
>
>
>
Well, i have put the <![CDATA[ "my strings here" ]]>
And it work perfectly.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>