Commy_Code_Monkey has asked for the wisdom of the Perl Monks concerning the following question:
When executed, the STDOUT (command window) says:open(LOG, "+>Test.log"); for($x=0;$x<=100;$x++){ print "\rProgress...$x\%"; print LOG "\rProgress...$x\%"; } print "\rProgress...Done!\n"; print LOG "\rProgress...Done!\n"; close LOG; $wait=<>;
but my log file says:"Progress...Done!"
Is there a way I can force the log file to behave like the STDOUT in the command window, and overwrite the previous 'progress'?"Progress...0% Progress...1% Progress...2% ... Progress...100% Progress...Done!"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: overwrite last line printed
by SuicideJunkie (Vicar) on Nov 25, 2011 at 20:29 UTC | |
|
Re: overwrite last line printed
by TJPride (Pilgrim) on Nov 25, 2011 at 21:15 UTC | |
|
Re: overwrite last line printed
by NetWallah (Canon) on Nov 25, 2011 at 23:39 UTC | |
by RichardK (Parson) on Nov 26, 2011 at 14:01 UTC | |
by Anonymous Monk on Nov 26, 2011 at 14:48 UTC | |
by Marshall (Canon) on Nov 27, 2011 at 01:47 UTC | |
by SuicideJunkie (Vicar) on Nov 28, 2011 at 14:39 UTC | |
|
Re: overwrite last line printed
by Anonymous Monk on Nov 26, 2011 at 14:33 UTC |