Hi Adam,
sounds like the symptoms you'd get if the value you're sending to R
has a newline character hanging on the end. Perl will do the
conversion to an integer when required [1], but if you're passing
such a thing to R it'll probably get grumpy. Just chomp the line
before doing the extraction of the values and with any luck all will
be well.
[1] For example...
#!/usr/bin/perl
use warnings;
use strict;
my $string="98\n";
my $sub=$string-10;
print "OK we now have $sub\n";
=====>>>> OK we now have 88
Cheers,
Paul