Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You can't use a string as a reference while strict refs is in use. That's the whole point of strict refs. If you want to use a string as a reference, you should disable strict refs.
Your question is a bit like asking, "I've put up a sign on my front gate which says 'No Dogs Allowed'. Now I can't let my dog into my garden. How do I let my dog into my garden?" If you want to use non-strict references, don't put up a sign (use strict) that says only strict references are allowed.
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In reply to Re: using a string as a SCALAR ref while "strict refs" in use
by tobyink
|
|