Re: sending scalar and hash to function [SUMMARY]

2011-06-27 Thread Mike Williams
On Mon, Jun 27, 2011 at 2:44 PM, wrote: > > Found the solution (my apologies). > > I am receiving both an scalar, the second one as a reference, then it must > be assigned to an other var. > > No. It does not have to be assigned to another var. Instead you should dereference the reference. su

sending scalar and hash to function [SUMMARY]

2011-06-27 Thread buzon
Found the solution (my apologies). I am receiving both an scalar, the second one as a reference, then it must be assigned to an other var. sub dosomething { ($myopt,$myparams) = @_; %myparams = $myparams; print "opt = $myopt\n"; while( my ($k, $v) = each %myparams )