Skip to content

Instantly share code, notes, and snippets.

@ilmari
Created December 8, 2011 11:18
Show Gist options
  • Save ilmari/1446744 to your computer and use it in GitHub Desktop.
Save ilmari/1446744 to your computer and use it in GitHub Desktop.
$ +{ count_by { $_->status } grep { $_->server_id < 10**7 } @orders }
$HASH1 = {
cancelled => 2,
despatched => 5,
packed => 4,
partial => 20,
pending => 1,
printing => 337
};
$ +{ count_by { $_->status } @orders }
$HASH1 = {
cancelled => 8,
despatched => 5,
new => 1,
packed => 8,
partial => 30,
pending => 1,
printing => 548,
unpaid => 3
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment