brijeshsnm has asked for the wisdom of the Perl Monks concerning the following question:
the o/p which iam getting isuse 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;
all the three messages r getting concatenated then passed. but If i use "\n" in first print to process statement then i getThe 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 next two messages are getting lost, the o/p which iam expecting isThe 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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: open3, process sychronization problem
by kvale (Monsignor) on Feb 02, 2004 at 10:48 UTC | |
by Anonymous Monk on Feb 02, 2004 at 13:02 UTC |