J
juergen
Hello!
I want to overwrite a global variable (main: from a block. Here is my
code:
-----
$MS_IMG_PATH = "foobar";
if ( exists($ENV{'PRODUCT'}) )
{
$MS_IMG_PATH = 'barfoo';
if ( $ENV{'PRODUCT'} eq "7b4/105/1" )
{
print "$MS_IMG_PATH\n";
$MS_IMG_PATH = '/dcim/100olymp';
print "$MS_IMG_PATH\n";
}
print "$MS_IMG_PATH\n";
}
print "$MS_IMG_PATH\n";
----
The program puts out:
barfoo
/dcim/100olymp
/dcim/100olymp
foobar
But it should be:
barfoo
/dcim/100olymp
/dcim/100olymp
/dcim/100olymp
I really can't imagine what is going on.
Thank you in advance!
Bye, juergen
I want to overwrite a global variable (main: from a block. Here is my
code:
-----
$MS_IMG_PATH = "foobar";
if ( exists($ENV{'PRODUCT'}) )
{
$MS_IMG_PATH = 'barfoo';
if ( $ENV{'PRODUCT'} eq "7b4/105/1" )
{
print "$MS_IMG_PATH\n";
$MS_IMG_PATH = '/dcim/100olymp';
print "$MS_IMG_PATH\n";
}
print "$MS_IMG_PATH\n";
}
print "$MS_IMG_PATH\n";
----
The program puts out:
barfoo
/dcim/100olymp
/dcim/100olymp
foobar
But it should be:
barfoo
/dcim/100olymp
/dcim/100olymp
/dcim/100olymp
I really can't imagine what is going on.
Thank you in advance!
Bye, juergen