Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Search and substitute into data structures

by ferreira (Chaplain)
on Apr 30, 2007 at 19:04 UTC ( #612838=note: print w/replies, xml ) Need Help??


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);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://612838]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-11-13 03:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (149 votes). Check out past polls.

    Notices?