in reply to THANKS TO ALL: Passing huge args to system call

Afaik no kernel but HURD does not impose a software level hard limit on the number of arguments. On darwin, IIRC, the buffer is at most 64K in length. I think Linux is in the same ballpark.

These may be defaults to kernel params, or even sysctlable, but there is a limit, and it isn't very big. I would suggest following on the advice that others gave you, to open a pipe.

I would do it with a pipe to self, or by piping to $^X:

defined(my $pid = open my $child, "|-") or die "$!"; if ($pid){ # parent print $child "$args"; } else { #child my $args = <STDIN>; } # or for an exec, at least run $^X instead of "perl": open my $child, "|$^X", $scriptfile;
-nuffin
zz zZ Z Z #!perl