Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: [Raku] Limited argument list issue in IO::String (Text::CSV)

by Tux (Canon)
on May 03, 2023 at 15:03 UTC ( [id://11151977]=note: print w/replies, xml ) Need Help??


in reply to [Raku] Limited argument list issue in IO::String (Text::CSV)

$ cat test.raku #!raku use Slang::Tuxic; use Text::CSV; say "All of it"; my @aoh1 = csv (in => "test.csv", out => Hash); dd @aoh1; say "Fragment col 2"; my @aoh2 = csv (in => "test.csv", out => Hash, fragment => "col=2"); dd @aoh2; $ cat test.csv "No.","Name" "1","hello" "2","bye" $ raku test.raku All of it Array @aoh1 = [{:Name("hello"), "No." => "1"}, {:Name("bye"), "No." => + "2"}] Fragment col 2 Array @aoh2 = [{:Name("hello")}, {:Name("bye")}]

If you want a ; as separator, just add sep => ";".

You are allowed to use other ways to write it. Just read the docs.


Enjoy, Have FUN! H.Merijn

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2024-04-19 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found