Skip to content

Instantly share code, notes, and snippets.

@JJ
Created Dec 2, 2017
Embed
What would you like to do?
Split by `and`
use JSON::Tiny;
sub MAIN( Str $letter-to-santa = 'letters/dear-santa.txt' ) {
say to-json $letter-to-santa.IO.slurp().split(/\s* «and» \s*/);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment