in reply to pass by reference
because i think you want to give your sub a reference on the hash %horoscopes. but what you actualy did is to store a reference in $reference and give it to the sub but you used the scalar reference from the main program.&capitalise( \%horoscopes ); sub capitalise { my $values = shift; foreach ( keys ( %{$values} ) ) { .... ...this is not tested...
|
|---|