#! /usr/local/bin/perl -w use strict ; R("getwd()"); sub R { my $Rpath = "C:\\R\\rw\\bin\\" ; my $Rcmd = $Rpath . "rterm --vanilla --quiet --slave" ; my $Rscript = shift ; $Rscript =~ s/(\r|;\r)/ ;/gm ; $Rscript =~ s/<-/=/gm ; # \r or <- will break "echo" return `echo $Rscript | $Rcmd` ; }