in reply to Re: Using variable contents in new variable name
in thread Using variable contents in new variable name

If it turns out that you actually need symbolic references, and still want to use strict, you can put a "no strict refs" just before the symbolic reference work, which will temporarily disable strictness for symbolic references. Remember to re-enable them, though!

  • Comment on Re^2: Using variable contents in new variable name

Replies are listed 'Best First'.
Re^3: Using variable contents in new variable name
by johngg (Canon) on Dec 11, 2006 at 09:18 UTC
    Remember to re-enable them, though!

    Do it only in the scope of a small code block

    use strict; ... # strict in effect here ... { no strict q{refs}; # strict refs not in effect in the scope # of this code block so do something with # symbolic refs here ... } ... # strict refs back in effect again without having # to remember to re-enable it. ...

    But, as imp says, don't go there if you can possibly help it.

    Cheers,

    JohnGG