http://qs321.pair.com?node_id=612838


in reply to Search and substitute into data structures

You may try out Data::SearchReplace, a module whose 1.02 version was recently released. From the docs, it looks like it should be quite easy to do what you want using the module API. I would guess the solution you're looking for to be something like:

use Data::SearchReplace qw(sr); sr({ SEARCH => '<![CDATA[', REPLACE => '' }, $hash); sr({ SEARCH => '&lt;![CDATA[', REPLACE => '' }, $hash); sr({ SEARCH => ']]>', REPLACE => '' }, $hash); sr({ SEARCH => ']]&gt;', REPLACE => '' }, $hash);