Skip to content

Instantly share code, notes, and snippets.

@awwaiid
Created January 7, 2016 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awwaiid/6751d2897f63054c82ab to your computer and use it in GitHub Desktop.
Save awwaiid/6751d2897f63054c82ab to your computer and use it in GitHub Desktop.
awwaiid@misao:~/projects/perl6/lang/Inline-Ruby$ cat hiya.csv
id, name
1, andy
2, bella
3, chad
4, dua
awwaiid@misao:~/projects/perl6/lang/Inline-Ruby$ PERL6LIB=lib perl6
> use Inline::Ruby::Sweet
> ruby_require 'csv', ['CSV']
Requiring ruby module csv
> my $data = CSV.read('hiya.csv')
Calling CSV method read args hiya.csv
> $data
«[["id", " name"], ["1", " andy"], ["2", " bella"], ["3", " chad"], ["4", " dua"]]»:rb
> $data[3][1]
« chad»:rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment