I tried that already but it just gives me the final count at the end. I would like the output to change - the row count, that is - as each 100 rows is committed with the final output - when the program ends - to be:
INFO 3: start deleting rows. Rows deleted: 400 INFO 4: delete_rows.pl program ended. In other words, as time goes by, you see on your screen: INFO 3: start deleting rows. Rows deleted: 100 then ( overwriting the above ) INFO 3: start deleting rows. Rows deleted: 200 and so on until the end... Tony Esposito Oracle Developer, Enterprise Business Intelligence XO Communications Plano, TX 75074 Work Phone: 972-516-5344 Work Cell: 972-670-6144 Email: [EMAIL PROTECTED] -----Original Message----- From: Jenda Krynicky [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 06, 2004 2:59 PM To: [EMAIL PROTECTED] Subject: Re: 'print' output on one line From: "Esposito, Anthony" <[EMAIL PROTECTED]> > I have a perl program ( with DBI ) which prints out a line to STDOUT > after every 100 database commits. I would like the 'print' to just > refresh the current line every time but - not knowing how to get > around it - the program instead prints a new line every 100 commits > like so: > > INFO 3: start deleting rows. > Rows deleted: 100 > Rows deleted: 200 > Rows deleted: 300 > Rows deleted: 400 > ... > print "Rows deleted: $rows_deleted\n"; Use \r instead of \n: print "Rows deleted: $rows_deleted\r"; > > $row_counter = 0; > > } > > } > > print "INFO 4: $0 program ended.\n"; and don't forget to add a \n in front of the "INFO 4..." HTH, Jenda ===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz ===== When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>