in reply to Re: no strict "refs" and require
in thread no strict "refs" and require

the way desribed in that FAQ is the way which I use to do it :-) BUT that causes an error when running under strict pragma.
So my Question is, which one is the other way (that doens't cause strict to die with a nice warning about string "blabla" not allowed while strict refs) _and_ not explicitely saying 'no strict "refs"' ? Because the latter one gives me that strange feeling or am I paranoic here?

Have a nice day
All decision is left to your taste

Replies are listed 'Best First'.
Re: Re: Re: no strict "refs" and require
by blakem (Monsignor) on Feb 13, 2002 at 00:26 UTC
    The faq covers three different approaches. The first only works with globals and is not strict compliant. The second works with lexicals or globals and is strict compliant. The third shows how one could accomplish a similiar task using hash keys instead of variable names. I'd recommend either of the last two.

    -Blake

      safe as described in the faq

      $line =~ s/\$(\w+)/${getValue(\%myVars,\$1);}/sgex;

      but how do I get the defined skalars from the required script into my hash? that would be a way that I would prefer

      Have a nice day
      All decision is left to your taste