$GATE in a double quoted string will be considered a Perl variable. If you want to use an environment variable, you can use the %ENV hash:
system ("bsub xyz +OPTIONS_GATE=$ENV{GATE}")
Alternatively, you can escape the dollar sign so Perl does not treat $GATE as a Perl variable:
system ("bsub xyz +OPTIONS_GATE=\$GATE")
Or use a single quoted string, which does not interpolate variables:
system ('bsub xyz +OPTIONS_GATE=$GATE')
Note that if you had used
use strict;
use warnings;
It would have told you about this error. strict would have said:
Global symbol "$GATE" requires explicit package name
Execution of script.pl aborted due to compilation errors.
And warnings would have said:
Name "main::GATE" used only once: possible typo at script.pl line 12.
Use of uninitialized value $GATE in string at script.pl line 12.
When you do not use use strict; use warnings; your errors are not removed, they are only hidden from you, so that they are harder to find. Therefore, always use these two pragmas.
use strict; use warnings;. If finds many errors, including this one.