in reply to Passing values between shell and Perl scripts

If you mean doing this with both scripts running simultaneously,
you might want to look at pipes. You can make a pipe to go from
the shell script to the perl script, another pipe to return the values
from the perl script to the shell script.
You treat the pipes as filehandles to read and write too.
In bash you can make the pipes with the mkfifo command,
then call the perl script with system. The perl script should
use the pipes as it's stdin and stdout.
It's an alternative to running the perl script and capturing it's
output. Read  "perldoc -q  pipe".