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...
In reply to Re: pass by reference
by Taulmarill
in thread pass by reference
by bivouac
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |