Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2018-07-18 22:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (397 votes). Check out past polls.

    Notices?