in reply to
Call shell script variables in perl
system runs a subprocess, and because a subprocess gets its own copy of the environment, you cannot set/modify an environment variable from within a subprocess such that it will be available to the parent process (your Perl script here). In other words, the new subprocess' environment is gone as soon as the process has ended, i.e. when system returns. Exporting won't help.
But you could print the variable's value to stdout in the shell script, and capture it in the Perl script (e.g. via backticks).