in reply to Re^2: Wait ... Loading ... message in Perl/CGI
in thread Wait ... Loading ... message in Perl/CGI

That code works for me, but it's pretty ugly.

This works nearly universally but is only good for one line:

$|=1; # switch off buffering or this won't work print "please wait"; do_something(); print "\rthanks for waiting\n";
Note the \r return character. You can also use the \b backspace char.

If you can rely on having an ANSI terminal you can do a lot of interesting tricks. see a quick list. Or search CPAN for ANSI and Term.