run (\@cmd, '>pty>', sub{ print "$_[0]";}, '2>', sub { print "STDERR: $_[0]";}) or die("Error executing child. Child returned $&\n");