in reply to Re^3: How to create loop in perl dynamically
in thread How to create loop in perl dynamically
foreach my $foo (1 .. $x) ... creates a local variable named $foo which contains the current index for this particular loop. Never use $_ for this purpose, usually.