Re: Reading and producing variable lists (w/o hashes!)by why_bird (Pilgrim)
|on May 01, 2009 at 10:23 UTC||Need Help??|
I believe what you're trying to do is read in a bunch of names from a file, and then have those names available to use as variable names in your code? Is that right?
I remember once trying to do something similar, and eventually convincing myself that it was a struggle to do for a reason. For a start, it's a huuuuge security risk, which makes it bad practice, whether or not this code is going to be used by anyone else.
Perhaps this is an example of an X-Y problem, where you're not telling us what you're trying to achieve in the long run, or why you've chosen this particular method. Or maybe you're just doing it for the hell of it, because it seems like a fun thing to do, or just to find out if it can be done.
If the former, if you can outline your goal and what you've tried so far, I'm sure people will give you great suggestions as to how to proceed. This is the case in which not using 'use strict' may well come back to haunt you, unless you really know what you're doing! If the latter, good on you, and again I'm sure people will help you out.
I know this wasn't much practical help, but I think I'm echoing what was said above by almut, in that the more detail you give, the better and more useful people's answers will be.
I for one am curious about what you want to use this for!why_bird
Those are my principles. If you don't like them I have others.
-- Groucho Marx