How do I alter a to behave like b, while keeping my %c?
That is how to make the final line print ab while using the construct $c{a} = 'a' somehow in a.
sub a {
my $ref = shift;
my %c = %$ref;
$c{a} = 'a';
}
sub b {
my $c = shift;
$$c{b} = 'b';
}
my %c;
&a(\%c);
&b(\%c);
print foreach (keys %c);