Skip to content

Instantly share code, notes, and snippets.

@Tux
Created May 4, 2015 10:59
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 Tux/9d34d87eea19aa7d5dd9 to your computer and use it in GitHub Desktop.
Save Tux/9d34d87eea19aa7d5dd9 to your computer and use it in GitHub Desktop.
is this short enough?
$ cat test.pl
#!perl6
use Inline::Perl5;
my $p5 = Inline::Perl5.new;
$p5.use("Text::CSV_PP");
my $csv = $p5.invoke("Text::CSV_PP", "new");
for lines() :eager { $csv.parse($_); }
$ echo "1" | perl6 test.pl
$ echo "" | perl6 test.pl
Malformed UTF-8 character (fatal) at /pro/lib/perl5/site_perl/5.20.0/Text/CSV_PP.pm line 415.
in method invoke at lib/Inline/Perl5.pm6:479
in method invoke at lib/Inline/Perl5.pm6:460
in block at lib/Inline/Perl5.pm6:742
in block <unit> at test.pl:7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment