Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I guess the problem you are looking into solving revolves around your regexp not extracting your data as you would like. Maybe you should consider putting your data is a less half-assed format (yours looks like XML, but it's not even XML, so it's even worse). Use a simpler file format, don't reinvent XML badly. If you really need XML, use a module that will help you work with _real_ XML. Here is an example of what you could have used:
Use simple data representation for simple stuff, if it get more complex look into using a database. Don't overwhelm yourself with <,>,--,/ and friends. Aim for simplicity, your problems will resolve themselves. And finally, if you don't know what a particular piece of code in your program does (because, say, you've done some ctrl-c and some ctrl-v), remove it for now. Later, if you have a problem and you need to put it back in, you'll understand what it does. In reply to Re: Search and Replace Text File
by Schemer
|
|