foreach my $ref (keys %fred) ( $fred{$ref}->[2] = ++$i; )