in reply to rsync with ssh

What happens when you try to do the rsync from the command line?

What happens when you trigger it from cron, but not within Perl?

I'd suggest trying to remove as much complexity as possible, until you can track down which component is causing the problem. (well, it may be an odd interaction issue between multiple parts.)

See Using Rsync and SSH for information about using it from the command line. (I know I got into problems with certificates, when I tried connecting from a MacOSX box to a BSDI box, because of the different ways they wanted the certificate stored ... by testing command line first, you can confirm if it's a similar problem or not)