From andrew.clapp at gmail.com Sun Mar 1 08:48:03 2020 From: andrew.clapp at gmail.com (Andrew Clapp) Date: Sun, 1 Mar 2020 08:48:03 -0800 Subject: [Pdx-pm] Parsing CSV Files In-Reply-To: References: Message-ID: Hey Richard, Yeah, I've done that when I'm splitting it up manually, and then you have to also discard the leading " on the first record and the trailing " on the last one. I'm really liking the Text::CSV(_XS) route. It's working great. I just tell it what to do and it's doing it and giving me great clean data. Laziness for the win. -ASC On Sat, Feb 29, 2020 at 2:04 PM Richard Case wrote: > > Maybe you could use "," as your delimiter (i.e., those three characters). Sounds like fun :) > > On Sat, Feb 29, 2020, 4:20 AM Tina M?ller wrote: >> >> The standard nowadays is actually Text::CSV. >> It will automatically use Text::CSV_XS as the backend if available, and >> otherwise Text::CSV_PP. >> >> On Fri, 28 Feb 2020, Andrew Clapp wrote: >> >> > Thanks! I'll check it out. Weird name for a "standard". >> > >> > -ASC >> > >> > On Fri, Feb 28, 2020 at 6:30 PM Andy Lester wrote: >> >> >> >> Text::CSV_XS is pretty much the standard. >> >> >> >>> On Feb 28, 2020, at 8:27 PM, Andrew Clapp wrote: >> >>> >> >>> Hello folks, I'm seeking advice on a module if anyone out there knows >> >>> of something that's already there. >> >>> >> >>> I'm looking at a few different options from cpan but I'm stuck on >> >>> finding a ready made solution for this one. There's gotta be >> >>> something I missed. Here's the problem in brief. >> >>> >> >>> I have to parse a CSV file, but it's double-quote wrapped, with commas >> >>> in the fields. >> >>> >> >>> Example with a header... >> >>> >> >>> "ID","name","desc","detailed desc" >> >>> "1234","thing","A nifty phrase that's easy to read","some, list, of >> >>> things, with commas, not so easy" >> >>> >> >>> I've tried Pasrse::CSV which looks promising, and tried doing it >> >>> myself, which works, but it's kludgey beyond useful legibility. I >> >>> believe there's a good way to do this that I've not seen yet. >> >>> >> >>> Ideas? >> >>> >> >>> Thanks for looking. >> >>> >> >>> -ASC >> >>> >> >>> >> >>> -- >> >>> >> >>> Andrew S. Clapp >> >>> Aeonic Enterprises >> >>> >> >>> "They're always searching for the magic bullet, and actually it's the >> >>> culmination of a lot of different things." -Ken Fischer >> >>> _______________________________________________ >> >>> Pdx-pm-list mailing list >> >>> Pdx-pm-list at pm.org >> >>> https://mail.pm.org/mailman/listinfo/pdx-pm-list >> > >> > >> > >> > -- >> > >> > Andrew S. Clapp >> > Aeonic Enterprises >> > >> > "They're always searching for the magic bullet, and actually it's the >> > culmination of a lot of different things." -Ken Fischer >> > _______________________________________________ >> > Pdx-pm-list mailing list >> > Pdx-pm-list at pm.org >> > https://mail.pm.org/mailman/listinfo/pdx-pm-list >> > >> _______________________________________________ >> Pdx-pm-list mailing list >> Pdx-pm-list at pm.org >> https://mail.pm.org/mailman/listinfo/pdx-pm-list -- Andrew S. Clapp Aeonic Enterprises "They're always searching for the magic bullet, and actually it's the culmination of a lot of different things." -Ken Fischer From andrew.clapp at gmail.com Mon Mar 2 18:48:21 2020 From: andrew.clapp at gmail.com (Andrew Clapp) Date: Mon, 2 Mar 2020 18:48:21 -0800 Subject: [Pdx-pm] Parsing CSV Files In-Reply-To: References: Message-ID: Hey all. One more thing with a different file for the project that has unescaped " chars in one of the fields (that contains raw html descriptions). Text::CSV throws this: # CSV_XS ERROR: 2034 - EIF - Loose unescaped quote @ rec 0 pos 4 field 1 I just started working on this one, but nothing super obvious has popped up yet. I probably need to qw() or qq() something before the parse. Any ideas are appreciated. -ASC On Sun, Mar 1, 2020 at 8:48 AM Andrew Clapp wrote: > > Hey Richard, > > Yeah, I've done that when I'm splitting it up manually, and then you > have to also discard the leading " on the first record and the > trailing " on the last one. I'm really liking the Text::CSV(_XS) > route. It's working great. I just tell it what to do and it's doing > it and giving me great clean data. Laziness for the win. > > -ASC > > On Sat, Feb 29, 2020 at 2:04 PM Richard Case wrote: > > > > Maybe you could use "," as your delimiter (i.e., those three characters). Sounds like fun :) > > > > On Sat, Feb 29, 2020, 4:20 AM Tina M?ller wrote: > >> > >> The standard nowadays is actually Text::CSV. > >> It will automatically use Text::CSV_XS as the backend if available, and > >> otherwise Text::CSV_PP. > >> > >> On Fri, 28 Feb 2020, Andrew Clapp wrote: > >> > >> > Thanks! I'll check it out. Weird name for a "standard". > >> > > >> > -ASC > >> > > >> > On Fri, Feb 28, 2020 at 6:30 PM Andy Lester wrote: > >> >> > >> >> Text::CSV_XS is pretty much the standard. > >> >> > >> >>> On Feb 28, 2020, at 8:27 PM, Andrew Clapp wrote: > >> >>> > >> >>> Hello folks, I'm seeking advice on a module if anyone out there knows > >> >>> of something that's already there. > >> >>> > >> >>> I'm looking at a few different options from cpan but I'm stuck on > >> >>> finding a ready made solution for this one. There's gotta be > >> >>> something I missed. Here's the problem in brief. > >> >>> > >> >>> I have to parse a CSV file, but it's double-quote wrapped, with commas > >> >>> in the fields. > >> >>> > >> >>> Example with a header... > >> >>> > >> >>> "ID","name","desc","detailed desc" > >> >>> "1234","thing","A nifty phrase that's easy to read","some, list, of > >> >>> things, with commas, not so easy" > >> >>> > >> >>> I've tried Pasrse::CSV which looks promising, and tried doing it > >> >>> myself, which works, but it's kludgey beyond useful legibility. I > >> >>> believe there's a good way to do this that I've not seen yet. > >> >>> > >> >>> Ideas? > >> >>> > >> >>> Thanks for looking. > >> >>> > >> >>> -ASC > >> >>> > >> >>> > >> >>> -- > >> >>> > >> >>> Andrew S. Clapp > >> >>> Aeonic Enterprises > >> >>> > >> >>> "They're always searching for the magic bullet, and actually it's the > >> >>> culmination of a lot of different things." -Ken Fischer > >> >>> _______________________________________________ > >> >>> Pdx-pm-list mailing list > >> >>> Pdx-pm-list at pm.org > >> >>> https://mail.pm.org/mailman/listinfo/pdx-pm-list > >> > > >> > > >> > > >> > -- > >> > > >> > Andrew S. Clapp > >> > Aeonic Enterprises > >> > > >> > "They're always searching for the magic bullet, and actually it's the > >> > culmination of a lot of different things." -Ken Fischer > >> > _______________________________________________ > >> > Pdx-pm-list mailing list > >> > Pdx-pm-list at pm.org > >> > https://mail.pm.org/mailman/listinfo/pdx-pm-list > >> > > >> _______________________________________________ > >> Pdx-pm-list mailing list > >> Pdx-pm-list at pm.org > >> https://mail.pm.org/mailman/listinfo/pdx-pm-list > > > > -- > > Andrew S. Clapp > Aeonic Enterprises > > "They're always searching for the magic bullet, and actually it's the > culmination of a lot of different things." -Ken Fischer -- Andrew S. Clapp Aeonic Enterprises "They're always searching for the magic bullet, and actually it's the culmination of a lot of different things." -Ken Fischer From andrew.clapp at gmail.com Mon Mar 2 19:01:40 2020 From: andrew.clapp at gmail.com (Andrew Clapp) Date: Mon, 2 Mar 2020 19:01:40 -0800 Subject: [Pdx-pm] Parsing CSV Files In-Reply-To: References: Message-ID: This looks promising.... https://metacpan.org/pod/Text::CSV::Encoded -ASC On Mon, Mar 2, 2020 at 6:48 PM Andrew Clapp wrote: > > Hey all. One more thing with a different file for the project that > has unescaped " chars in one of the fields (that contains raw html > descriptions). Text::CSV throws this: > > # CSV_XS ERROR: 2034 - EIF - Loose unescaped quote @ rec 0 pos 4 field 1 > > I just started working on this one, but nothing super obvious has > popped up yet. I probably need to qw() or qq() something before the > parse. > > Any ideas are appreciated. > > > -ASC > > On Sun, Mar 1, 2020 at 8:48 AM Andrew Clapp wrote: > > > > Hey Richard, > > > > Yeah, I've done that when I'm splitting it up manually, and then you > > have to also discard the leading " on the first record and the > > trailing " on the last one. I'm really liking the Text::CSV(_XS) > > route. It's working great. I just tell it what to do and it's doing > > it and giving me great clean data. Laziness for the win. > > > > -ASC > > > > On Sat, Feb 29, 2020 at 2:04 PM Richard Case wrote: > > > > > > Maybe you could use "," as your delimiter (i.e., those three characters). Sounds like fun :) > > > > > > On Sat, Feb 29, 2020, 4:20 AM Tina M?ller wrote: > > >> > > >> The standard nowadays is actually Text::CSV. > > >> It will automatically use Text::CSV_XS as the backend if available, and > > >> otherwise Text::CSV_PP. > > >> > > >> On Fri, 28 Feb 2020, Andrew Clapp wrote: > > >> > > >> > Thanks! I'll check it out. Weird name for a "standard". > > >> > > > >> > -ASC > > >> > > > >> > On Fri, Feb 28, 2020 at 6:30 PM Andy Lester wrote: > > >> >> > > >> >> Text::CSV_XS is pretty much the standard. > > >> >> > > >> >>> On Feb 28, 2020, at 8:27 PM, Andrew Clapp wrote: > > >> >>> > > >> >>> Hello folks, I'm seeking advice on a module if anyone out there knows > > >> >>> of something that's already there. > > >> >>> > > >> >>> I'm looking at a few different options from cpan but I'm stuck on > > >> >>> finding a ready made solution for this one. There's gotta be > > >> >>> something I missed. Here's the problem in brief. > > >> >>> > > >> >>> I have to parse a CSV file, but it's double-quote wrapped, with commas > > >> >>> in the fields. > > >> >>> > > >> >>> Example with a header... > > >> >>> > > >> >>> "ID","name","desc","detailed desc" > > >> >>> "1234","thing","A nifty phrase that's easy to read","some, list, of > > >> >>> things, with commas, not so easy" > > >> >>> > > >> >>> I've tried Pasrse::CSV which looks promising, and tried doing it > > >> >>> myself, which works, but it's kludgey beyond useful legibility. I > > >> >>> believe there's a good way to do this that I've not seen yet. > > >> >>> > > >> >>> Ideas? > > >> >>> > > >> >>> Thanks for looking. > > >> >>> > > >> >>> -ASC > > >> >>> > > >> >>> > > >> >>> -- > > >> >>> > > >> >>> Andrew S. Clapp > > >> >>> Aeonic Enterprises > > >> >>> > > >> >>> "They're always searching for the magic bullet, and actually it's the > > >> >>> culmination of a lot of different things." -Ken Fischer > > >> >>> _______________________________________________ > > >> >>> Pdx-pm-list mailing list > > >> >>> Pdx-pm-list at pm.org > > >> >>> https://mail.pm.org/mailman/listinfo/pdx-pm-list > > >> > > > >> > > > >> > > > >> > -- > > >> > > > >> > Andrew S. Clapp > > >> > Aeonic Enterprises > > >> > > > >> > "They're always searching for the magic bullet, and actually it's the > > >> > culmination of a lot of different things." -Ken Fischer > > >> > _______________________________________________ > > >> > Pdx-pm-list mailing list > > >> > Pdx-pm-list at pm.org > > >> > https://mail.pm.org/mailman/listinfo/pdx-pm-list > > >> > > > >> _______________________________________________ > > >> Pdx-pm-list mailing list > > >> Pdx-pm-list at pm.org > > >> https://mail.pm.org/mailman/listinfo/pdx-pm-list > > > > > > > > -- > > > > Andrew S. Clapp > > Aeonic Enterprises > > > > "They're always searching for the magic bullet, and actually it's the > > culmination of a lot of different things." -Ken Fischer > > > > -- > > Andrew S. Clapp > Aeonic Enterprises > > "They're always searching for the magic bullet, and actually it's the > culmination of a lot of different things." -Ken Fischer -- Andrew S. Clapp Aeonic Enterprises "They're always searching for the magic bullet, and actually it's the culmination of a lot of different things." -Ken Fischer From enobacon at gmail.com Fri Mar 6 10:05:09 2020 From: enobacon at gmail.com (Eric Wilhelm) Date: Fri, 06 Mar 2020 10:05:09 -0800 Subject: [Pdx-pm] Meeting Location for giving a talk? Topic ideas? In-Reply-To: <20200217204130.GV87901@us.holligan.net> References: <20200217204130.GV87901@us.holligan.net> Message-ID: <6028662.769JvGnRzx@broq> Hi all, I won't be able to make the regularly scheduled 2nd Wednesday next week (March 11th) but April 8th looks more promising. Thanks, Eric On Monday, February 17, 2020 12:41:30 Andrew Hewus Fresh wrote: > At the last Perlmonger meetup, Eric and I were talking about doing some > talks and finding a location to do that to try to stir up interest. > > Anyone have thoughts on place to host or things to talk about? I'm > going to ask Lyle to see if he can host some at Collective Agency, but > he runs a functional programming meetup, so I don't think he wants to > take on hosting full-time. > > We came up with that we thought we could talk about without too much > trouble, but if you have things you'd like to hear about, or be able to > talk about, even better. > > * Inheritance in Perl > (This would be an updated version of a talk I gave at pdx.pm already) > http://cvs.afresh1.com/~andrew/talks/inheritance_in_perl_pdx_pm > * Perltidy, what it is, new features > * Intro to DBIx::Class > * Perl Worst Practices > * Intro to Mojolicious > * Intro to Dist::Zilla > * What is CPANTesters? > * Plenv and Carton > * Intro to Plack Middleware > * Intro to Mocking > > We do have an old Meeting Wishlist, not sure if that gives y'all ideas. > https://github.com/PortlandPerlMongers/portlandperlmongers.github.io/wiki/Me > etingWishlist > > l8rZ,