#!/usr/local/bin/perl use IPC::Open2; $SIG{CHLD} = sub { $i = 1 }; local ( *RD, *WR ); print "Opening $ARGV[0]\n"; my $child = open2(\*RD, \*WR, "$ARGV[0]") || die "couldn't open $ARGV[0]"; print "Finished opening $ARGV[0]\n"; $i = 0; while (1) { $prompt = ; print $prompt; last if ( $i = 1 ); $cmd = ; $cmd1 = "'".$cmd."'"; print WR "$cmd"; }