use Statistics::R; my $r_connection = Statistics::R->new();