[Chicago-talk] parsing lines

Jay S me at heyjay.com
Sun May 5 16:07:50 PDT 2024


thanks Steve. I had asked for a new, delimited file, and got it

On Fri, May 3, 2024 at 3:39 PM Steven Lembark <lembark at wrkhors.com> wrote:

> On Wed, 24 Apr 2024 15:00:21 -0500
> Jay S <me at heyjay.com> wrote:
>
> > Hi no worries.
> > Like I said in playing with the data it became harder to do the
> > parsing I needed.
> > long story short, I requested (and was given) the data in CSV
>
> Make your life easier: Choose a delimeted format (CSV is recursive).
>
> Pick something other than a ',' for the separator: '|' is usually a
> good choice. At that point you don't need to deal with escaped
> separators, quoted escapes of escaped quotes of separators... blech.
>
> Your entire input process becomes:
>
>     my @fieldz  = split $sep => $input;
>
> and you're done.
>
> If the raw input doesn't include literal tabs, tab separated ("TSV")
> is common and makes it easy to look at the files using *nix command
> line tools like cut and grep.
>
>
>
> --
> Steven Lembark
> Workhorse Computing
> lembark at wrkhors.com
> +1 888 359 3508
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> https://mail.pm.org/mailman/listinfo/chicago-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/chicago-talk/attachments/20240505/f328bd95/attachment.html>


More information about the Chicago-talk mailing list