in reply to how to increase input buffer size in perl?

Input line is too long for input buffer of 32766 characters.

That comes from IDL itself. It is probably caused by:

arr1 ='@array1'

Which if @array1 contains a large number of values, will come out as one very long line.

I don't know IDL syntax, but you might work around it by breaking the array assignment across multiple lines something like:

my $array1 = ''; $array1 .= @array1[ $_ .. $_ + 10 ] . "\n" for map $_* 10, 0 .. $#arra +y1 / 10; ... arr1 = '$array1'

You also might look at PDL.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^2: how to increase input buffer size in perl?
by Anonymous Monk on Mar 31, 2010 at 21:10 UTC
    Thanks BrowserUk. That must be it. But I don't get how that line of code you gave works? Could you explain?

      The notion was to break up the long line by inserting newlines every 10 values.

      But, if IDL accepts that, then it would be far easier to just put one value per line:

      my $array1 = join "\n", @array1; ... arr1 = '$array1' ...

      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.