Update: Although because of the (greatly complicated) Perl module that this script is reliant on I wasn't able to try a lot of the suggestions, a simple modification has reduced the incidence of the problem to a much more acceptable level (now about 1 in 8 of the times the script is run). The modification is as follows:
$R_send_0 = "$R_comment_out$R_line0"; $R_send_1 = "$R_line1$R_line2$R_line3$R_line4$R_line5"; $R_send_2 = "$R_dblquotation_start$R_line6$R_send_3"; my $r_send_comment = $R_send_0; my $r_send_string = $R_send_1; my $r_send_string2 = $R_send_2; $R->send (qq'$r_send_string'); $R->send (qq'$r_send_string2'); my $ret = $R->read; push (@R_output_store, $r_send_comment); push (@R_output_store, $ret); print $ret; print "\n\n";
has been changed to:
$R_send_0 = "$R_comment_out$R_line0"; $R_send_1 = "$R_line1$R_line2$R_line3$R_line4$R_line5"; $R_send_2 = "$R_dblquotation_start$R_line6$R_send_3"; $R_send = "$R_send_1\n$R_send_2"; my $r_send_comment = $R_send_0; my $r_send_string = $R_send; $R->send (qq'$r_send_string'); push (@R_output_store, $r_send_comment); print $r_send_comment; print "\n"; my $ret = $R->read; push (@R_output_store, $ret); print $ret; print "\n\n";
The program as I say is still not completely free of problems. The freezing continues to occur at a low frequency, and a warning message of the form: 'Warning Message: cannot open file 'input.4.r' is sometimes displayed at the end of the screen-printed output.

In reply to Re^3: Peculiar Perl/R Problem - Memory? by maybeD
in thread Peculiar Perl/R Problem - Memory? by maybeD

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.