Skip to content

Instantly share code, notes, and snippets.

@tsucchi
Last active September 12, 2015 08:45
Show Gist options
  • Save tsucchi/510ac14b77f862f755b3 to your computer and use it in GitHub Desktop.
Save tsucchi/510ac14b77f862f755b3 to your computer and use it in GitHub Desktop.
score.pl の次の一歩。一人分の合計
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
my $papix = {
name => 'papix',
affiliation => 'namba.pm',
perl => 60,
python => 50,
ruby => 50,
php => 80,
binary => 30,
};
my @languages = qw(perl python ruby php binary);
my $sum = 0;
for my $language ( @languages ) {
$sum = $sum + $papix->{$language};
}
$papix->{sum} = $sum;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment