in reply to using R from Perl
Here is another PM thread (which shows a basic approach):
Passing parameters to R script