I can not set environment variables with both ways here:
my $name = 'BLUBB';
$ENV{$name} = 'foo';
$ENV{'BLAFASEL'} = "bar";
both does not work here (under win2k) (in the sense, that the values are not seen in
set after running that script).
In any case you don't need to surround the variable with "...".
Hint: Line breaks in your post are ignored (if they are not in the inner of code tags), you have to use html tags to format it.