Welcome to the Monastery | |
PerlMonks |
Re: Assigning value to the array elementsby no_slogan (Deacon) |
on Oct 28, 2005 at 14:50 UTC ( [id://503668]=note: print w/replies, xml ) | Need Help?? |
Several people have offered alternatives to what you're trying to do, and that's good. But nobody has told you why you shouldn't be doing it, and that's explained by MJD. Because I am a bad person, I'll tell you that you can do what you want by a) saying ${$vars[$i]}=$_, b) removing the "my" from $first='' and so on, and c) removing the dollar signs from @vars. But don't do that.
In Section
Seekers of Perl Wisdom
|
|