Socrates has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing an update program that uses rsync to copy code files from one location to the other. First I do a dry-run to get the list of files, then I match them with a regex to see which ones are perl files. Then I check them with `perl -wc $file_to_test`.
What I'd like to do is have a running total that says:
Testing file: XXX
Passed: 30
Failed: 2
This spans multiple lines, and, rather than printing those three lines with \n over and over again, I'd like to have them as a sort of running tally. I know that I can return to the beginning of the last line printed with \r and just overwrite one line, but how do I do this across multiple lines?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to re-print multiple lines?
by oko1 (Deacon) on Jul 09, 2008 at 19:51 UTC | |
Re: How to re-print multiple lines?
by jethro (Monsignor) on Jul 09, 2008 at 19:00 UTC | |
Re: How to re-print multiple lines?
by jds17 (Pilgrim) on Jul 09, 2008 at 18:51 UTC | |
Re: How to re-print multiple lines?
by moritz (Cardinal) on Jul 09, 2008 at 19:09 UTC |