in reply to THANKS TO ALL: Passing huge args to system call
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;
|
|---|