I'm running up against the pipe buffer doing this:
my $success = run [$echo => -e => "\'" => join("\n", @iptout) => "\'"], '|', [$ipt_cmd => 'iptables-restore'], '>', \my $cmdout, '2>&1';
Error:
exec failed: Argument list too long at ./firewall.pl line 852So, I figured I'd try this:
my $success = run [$ipt_cmd => 'iptables-restore'], '>', \my $cmdout, '2>&1', '<<<', '${', [$echo => -e => "\'" => join("\n", @iptout) => +"\'"], '}';
Error:
No such file or directory: open( <<, 0x000 ) at ./firewall.pl line 852But I can't figure out how to get it in proper syntax for IPC::Run? Also, per the limit I'm hitting 'man 7 pipe (I'm running 3.10+ on 64 bit, but this is the latest pipe manpage): In Linux versions before 2.6.11, the capacity of a pipe was the same as the system page size (e.g., 4096 bytes on i386). Since Linux 2.6.11, the pipe capacity is 65536 bytes.
In reply to IPC::Run / bash pipe by ag4ve
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |