#! perl -slw use strict; use Win32::Socketpair qw[ winopen2_5 ]; my( $pid, $sock ) = winopen2_5( 'perl.exe', '-c' ); print $sock <<'EOP'; my $x = 365.25**3; my $y = qx[ perl -c -e"say 'boo'"; ]; my $z = sub { print $sock <<; my $x = 365.25**3; my $y = qx[ perl -c -e"say 'boo'"; ]; my $z = sub { print $sock <<; my $x = 365.25**3; my $y = qx[ perl -c -e"say 'boo'"; ]; my $z = sub { 1; }; }; }; EOP shutdown $sock, 1; print while <$sock>; close $sock; ( $pid, $sock ) = winopen2_5( 'perl.exe', q[-E"say 'hello'; warn; die;"] ); shutdown $sock, 1; print while <$sock>; close $sock; __END__ C:\test>winopen2_5 - syntax OK Warning: something's wrong at -e line 1. Died at -e line 1. hello