in reply to passing the reference of hash values array

I think you want:

 my $mean_of_arr = &average( [ values %arr ] );

[LIST] creates an anonymous array ref.

but why do you use this old function &call syntax?

Cheers Rolf

Replies are listed 'Best First'.
Re^2: passing the reference of hash values array
by Anonymous Monk on Nov 17, 2010 at 02:08 UTC
    yep the brackets worked. thanks : ) Is it better to just use 'average(...)"? I just use the & since it gets highlighted/colorcoded for syntax whereas without the & its just plain black text.
      yes, IIRC it bypasses some mechanisms like prototype checking ...

      which editor do you use?

      Cheers Rolf

        Ah, I will switch over to the new syntax then. I use vim.