Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: lightweight CSV parser

by wrinkles (Pilgrim)
on Dec 22, 2011 at 08:32 UTC ( #944735=note: print w/replies, xml ) Need Help??


in reply to Re: lightweight CSV parser
in thread lightweight CSV parser

That appears to be a filehandle reference, not a regular string. I actually tried initially to use YAML strings, and with YAML::Syck was able to get a prototype working by opening a string reference as a filehandle, then loaded with YAML::Syck::LoadFile($fh) . That was the only YAML parser that worked like that, and when I tried the same thing within Movable Type, it wouldn't read the filehandle. "No such file or directory -type errors. So I gave up.

It looked simple, but I'm missing some key concept.

Maybe parsing CSV is easier. I'll give it a try.

Replies are listed 'Best First'.
Re^3: lightweight CSV parser
by Anonymous Monk on Dec 22, 2011 at 08:44 UTC

    That appears to be a filehandle reference, not a regular string ...

    Well, if you insist http://search.cpan.org/perldoc/Text::CSV#SYNOPSIS only works with files, that is how you treat a regular string ($stringOfCsv), as a filehandle

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://944735]
help
Chatterbox?
[Discipulus]: good morning again monks!
[choroba]: Good morning!
[Corion]: I have a rough plan to release an ImageNet classifier in Perl (well, using pretrained data, but still a nice toy)
Discipulus is going mad with the new win10 client.. tried mv Cortana /dev/null but no succes
[Corion]: Ouch - another pretrained set is available, using images from IMDB and Wikipedia. So I expect interesting results for non-PR images where people are pictured that are not made up
[Corion]: Discipulus: Yeah, from my investigations, you can somewhat silence+disable Cortana, but some services of it remain always running unfortunately. What a waste of resources :-/
[Corion]: I hope you had a good weekend still ;)
choroba had a workshop with the band
[choroba]: which counts as a good weekend

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2017-09-25 08:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (277 votes). Check out past polls.

    Notices?