in reply to split on comma unless within quotes...

Perhaps I left out the most important part...

The goal is to accomplish this using a module that I don't have to install on every server I intend to run this script on.

Maybe I just need to learn how to use something like PAR

  • Comment on Re: split on comma unless within quotes...

Replies are listed 'Best First'.
Re^2: split on comma unless within quotes...
by Anonymous Monk on Apr 10, 2014 at 11:48 UTC

    Consider that it is likely that:

    1. the time you spend writing, testing and debugging your own implementation will be greater than the time you spend installing the module on the servers
    2. your implementation will have less features than the existing modules
    3. the module you need is already installed on some of those servers

    If you still think you want to roll your own, then Text::Balanced is a core module that can help you deal with quoted strings.

Re^2: split on comma unless within quotes... (updated)
by LanX (Saint) on Apr 10, 2014 at 13:06 UTC