in reply to Perl for loop

It sounds like you are trying to use Symbolic-references.

If so, you should read why it is a BAD idea.

                Once it hits the fan, the only rational choice is to sweep it up, package it, and sell it as fertilizer.