Skip to content

Instantly share code, notes, and snippets.

@jani
Created August 13, 2009 19:20
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 jani/167399 to your computer and use it in GitHub Desktop.
Save jani/167399 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/perl6
my @data = (@*ARGS[0] ??
slurp(@*ARGS[0]) !!
$*IN.lines)>>.trim.split(/(\r\n|\n|\n\r)/)>>.split(/\s* ',' \s*/);
say @data.perl.subst("],", "],\n", :g);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment