use strict; use IPC::Open3; my $debug = open3(\*WRITE, \*READ, \*ERROR, "perl -Mre=debug -e 'qr/.../'"); #old incorrect stuff :) #while (||) { # my (@read, @error) = (, ); # print "READ: @read\n"; # print "ERROR: @error\n"; #} print ; close(\*WRITE, \*READ, \*ERROR);