I'm trying to set up a progress bar, and although I understand that "\r" should do a carriage return without a line feed (to return to the beginning of the current line, so as to overwrite the line again), it doesn't seem to do such on MacPerl (under OS9). For example:


for ( $x=1; $x<20; $x++ ) { print ( ("*" x $x) . ("." x (20-$x)) . "\r" ); }

Any ideas?

--
       Tim Bailey       |\/  "Of all tyrannies, a tyranny exercised for the
    [EMAIL PROTECTED]    |\/  good of its victims may be the most oppressive.
   [EMAIL PROTECTED]   |     It may be better to live under robber barons
 http://www.moonrise.org         than under omnipotent moral busybodies.
        --'--,--<@           The robber baron's cruelty may sometimes sleep,
                               his cupidity may at some point be satiated;
  but those who torment us for our own good will torment us without end,
         for they do so with the approval of their own conscience."
                             -- C.S. Lewis

Reply via email to