in reply to setenv system call

derby pointed out the problems with your code.

Here is a pure perl solution, that should work:

$ENV{RSYNC_PASSWORD} = $passwd;