in reply to Summing repeated counts for items stored in separate file

Oh, but dmorgo, you can do a simple UNIX-like paste. First construct a paste subroutine similar to the one below:
sub paste { my @fh = @_; return sub { chomp( my @line = map { scalar(<$_>) } @fh ); return join ' ', @line; } }
Notice that this sub returns another anonymous sub (called an iterator) that reads one line at a time from each of the input file handles and returns them "pasted" together, separated only by a little whitespace for easy splitting. To take advantage of this code, simply open your files and paste them together.
open my $keys, "keys.txt" or die "couldn't open keys.txt"; open my $vals, "vals.txt" or die "couldn't open vals.txt"; my $combined = paste($keys,$vals); print $combined->(), "\n" for 0..4;
Using the example keys and vals given in your question, the output of this reads:
Joe 5 Bob 3 Sally 7 Bob 1 Fred 1
If the deref syntax of $combined->() isn't quite to your taste, then whip up a little syntactic sugar to help the medicine go down:
sub NEXTLINE { $_[0]->() } print NEXTLINE($combined), "\n" for 0..4;
There are two benefits to this method that I can think of immediately. One is that it allows you to use a sub similar to the UNIX paste command with which you are already familiar. The second is that it avoids both the generation of a potentially huge %combined hash and the generation of a potentially huge combined.txt file. The concept of an iterator is not my original idea, but I use it whenever possible to keep my code clean and orderly. See Mark Jason Dominus's excellent text Higher Order Perl for more tricks and details on iterators.