Using an array element as a loop iteratorby gurpreetsingh13 (Scribe)
|on Nov 07, 2013 at 17:26 UTC||Need Help??|
gurpreetsingh13 has asked for the
wisdom of the Perl Monks concerning the following question:
I think this is a simple question. But somehow not working for me.
Can we use an array element as a loop iterator for another array?
Here is the code which fails(Ignoring all strict and other things).
Error: syntax error at -e line 1, near "$a["
I have checked. This works with a c-style for loop.
Similar thing works in python. What is the mistake in this due to which it is failing. Would be thankful for your help