You are not removing the trailing end of line \n characters from your input file that you put into $line so "renee" does not exist in your hash but "renee\n" would.
You can chomp the input from your text file to clear this up like below which should do the trick.
while (my $line = <CAPPED>) {
chomp $line;
$caplist{$line} = $x;
$x ++ ;
}