If I understand it correctly, for and foreach (same thing)
use your $Var2 as a localized alias to the items in the
list as they come through... so as far as I know there is
no way to do exactly what you want... you could do
for (1..5)
{
$Var2 = $_;
$Var1=$Var2;
print STDERR "$Var1\n";
$Var2="Test";
}
The localization is just an automatic thing... it's a
feature of for loops :)
- Ant