Last active
September 12, 2015 08:45
-
-
Save tsucchi/510ac14b77f862f755b3 to your computer and use it in GitHub Desktop.
score.pl の次の一歩。一人分の合計
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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