sub splitter { my %hasher = (); my $increase = 0; my $input = ""; while ($tester--) { $increase ++; push @key, $increase; } @hasher{@key} = @total; foreach $key (sort { $a <=> $b } keys %hasher) { print "Population #$key = $hasher{$key}\n"; } while () { print "Enter the population you will act on: "; chomp ($input = ); $output = $hasher{$input}; #references a specific value in the hash. print "$output BEFORE \n"; $output = $output + 8; print "$output AFTER\n"; $hasher{$input} = $output; #returns the modified value to the hash foreach $key (sort { $a <=> $b } keys %hasher) { print "Population #$key = $hasher{$key}\n"; } return $output; } }