Reputation: 45
I'm a newbie to Perl and Tcl. I'm trying to pass a variable from a Perl script to a Tcl script. I declared the variable as environment variable and trying to pass. But no results. Please find the code below:
Perl side:
$ENV{'output_directory_final'} = "./$Image_name/$Date_release/final";
Tcl side:
set out_path ${output_directory_final};
But, this is not working. Can anyone give any other ideas?
Upvotes: 1
Views: 316
Reputation: 1551
By special dispensation, the global array env
in Tcl contains the values of the environment variables for the process. In your case, try something like:
set out_path $env(output_directory_final)
Be mindful that if you are inside a proc
, then a global env
command is necessary to obtain local access to the variable.
Upvotes: 1