in reply to A dereferencing problem

Do you use strict; use warnings;?

You dereference $ref in the foreach-loop, while you certainly meant to dereference $param.

Or is this a typo that occured while posting the code?

regards,
tomte


An intellectual is someone whose mind watches itself.
-- Albert Camus

Replies are listed 'Best First'.
Re: Re: A dereferencing problem
by Scarborough (Hermit) on Apr 29, 2004 at 09:49 UTC
    Yes I was using strict and got something about can't use 1 as referance while using strict.

      And is $ref a typo or your actual code?

      Try gnorks advice, and let the offending line look like

      foreach my $key (keys(%$param)) {
      Or try to be more specific in your questions, always mentioning
      what
      code stripped down to a minimum
      where
      in the code
      which results
      e.g. error messages you got
      why
      Problem you try to solve
      (not necessarily in this order and on occasion deeply nested :)

      Edit: fixed $% to %$

      regards,
      tomte


      An intellectual is someone whose mind watches itself.
      -- Albert Camus