use IPC::Open3;
use Symbol;
use FileHandle;
open ABC,">output.txt";
open DEF,">Eoutput.txt";
$WTR = gensym(); # get a reference to a typeglob
$RDR = ">&ABC"; # and another one
$ERRR = ">&DEF"; # and another one
$pid = open3($WTR, $RDR, $ERRR,'date');
STDIN->autoflush();
STDOUT->autoflush();
ABC->autoflush();
$WTR->autoflush();
print $WTR "3//3//3 \n";
print $WTR "4//4/3 \n";
print $WTR "4/5/3 \n";
waitpid $pid,0;
####
The current date is: Sat 04/05/2003
Enter the new date: (mm-dd-yy) 3//3//34//4/34/5/3
The system cannot accept the date entered.
Enter the new date: (mm-dd-yy)
####
The current date is: Sat 04/05/2003
Enter the new date: (mm-dd-yy) 3//3//3
The system cannot accept the date entered.
Enter the new date: (mm-dd-yy)
####
The current date is: Sat 04/05/2003
Enter the new date: (mm-dd-yy) 3//3//3
The system cannot accept the date entered.
Enter the new date: (mm-dd-yy) 4//4/3
The system cannot accept the date entered.
Enter the new date: (mm-dd-yy) 4/5/3