$| = 1; # autoflush, because we are using \b to overwrite current line my $time = time(); my $FILE = $FTP->stor($filename); my ($buf,$bytes); while(my $bytecount = $FILE->read($buf, 10024)) { $bytes += $bytecount; print "\b",($bytes/(time()-$time+.01),"b/s"; # .01 to prevent divide by zero }