in reply to Re^3: Hash reference as a parameter
in thread Hash reference as a parameter

Thanks for your time. But this is not the solution that I wanted!

My idea is very simple. If the user creates the input parameters as a hash then he can alter the hash at any time and call the function. This is what I mean by the following statements.
my %input = {foo => 'bar', oof => 'wha'}; my_sub(\%input); $input{foo} = 'bar1'; my_sub(\%input);

Replies are listed 'Best First'.
Re^5: Hash reference as a parameter
by saberworks (Curate) on Sep 12, 2005 at 22:26 UTC
    So, in this case the code I posted first works fine, right? What I am confused about is why you want to pass things like this:
    my_sub(\%hash);
    instead of like this:
    my_sub(%hash);
    But, it really doesn't matter, if the solution works for you just use it :)

    Hrm, do you want the changes to be cumulative or to reset each time?
      Thanks! Your solution works.

      Finally I did this to achieve what I wanted