merlyn's points aside, it's still broken because you still have a my inside your eval'd string and the lexical will disappear with the BLOCK of the enclosing for.
$ perl -le 'use strict; for( 1..2 ) { eval qq{my \$q$_ = $_}; }; print + $q1' Global symbol "$q1" requires explicit package name at -e line 1.
In reply to Re^2: creating variables in a loop
by Fletch
in thread creating variables in a loop
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |