How to filter a lot of data with IPC::Open2?
问题 My task is to filter some data from perl script with external utility (the addr2line). The data size is quite large. I need to print a lot of data to stdin of program and read a lot of data back (from stdout of program into my script). Now I do this with IPC::Open2 , but I don't mix reading and writing. Is this legal? Will Open2 buffer any size of data in pipe? My code: my $cmd="addr2line -e $prog_name "; use IPC::Open2; local (*Reader, *Writer); my $pid = open2(\*Reader, \*Writer, $cmd); for