Re: replacing special chars

2005-02-04 Thread John
- Original Message - From: "Stout, Joel R" <[EMAIL PROTECTED]> To: "John" <[EMAIL PROTECTED]>; "Perl Beginners" Sent: Thursday, February 03, 2005 8:17 PM Subject: RE: replacing special chars > Try this, and remember - with XML there are mo

RE: replacing special chars

2005-02-03 Thread Stout, Joel R
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; return $data; } -