Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Complicated search and replace on a string

by Corion (Patriarch)
on May 17, 2017 at 14:10 UTC ( [id://1190467]=note: print w/replies, xml ) Need Help??


in reply to Complicated search and replace on a string

Simply use Text::CSV_XS, which knows about quoted fields and handles them properly.

  • Comment on Re: Complicated search and replace on a string

Replies are listed 'Best First'.
Re^2: Complicated search and replace on a string
by Doozer (Scribe) on May 17, 2017 at 14:32 UTC
    Thanks! I never even thought to look for a csv parser (facepalm).

    That module does the trick and saves me a lot of work. It's clear now I was searching for the wrong thing.

      In the Perl environment, you should always look for a CPAN module first.   Q: “What is all the Perl-language fuss about?”   A: “CPAN!”

      Modules – thousands of them – to do just about anything imaginable.   All installed on your system, and self-tested on your system, in a matter of seconds.   It is almost never the right thing to do, to “roll your own.”   Leverage CPAN heavily.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found