in reply to Variable scalar creation.
However, I would strongly urge you to use hashes - both for safety, and convenience.my $arraycnt = 0; $$_ = $values[$arraycnt++] for @names;
Update: Also, please read Why it's stupid to `use a variable as a variable name'
Another warning - there is no guarantee that the name you are attempting to create from the content of @names is a valid perl variable-identifier. You may get strange run-time errors.
..."I don't know what the facts are but somebody's certainly going to sit down with him and find out what he knows that they may not know, and make sure he knows what they know that he may not know, and that's a good thing. I think it's a very constructive exchange," --Donald Rumsfeld
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Variable scalar creation.
by snappybo (Initiate) on Feb 13, 2005 at 08:29 UTC | |
by davido (Cardinal) on Feb 13, 2005 at 16:28 UTC |