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>