Skip to content

Instantly share code, notes, and snippets.

@risou
Created December 20, 2010 07:56
Show Gist options
  • Save risou/748141 to your computer and use it in GitHub Desktop.
Save risou/748141 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl6
use v6;
sub MAIN() {
my $sum = 0;
while $_ = prompt("> ") {
my @strs = $_.split(',');
$sum += @strs.pop;
}
say 'sum ', $sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment