#in perl-script "script.pl" print $variable; #in the shell-script: variable=$(perl script.pl) echo $variable