|
Posted by mmccaws2 on April 17, 2008, 11:21 am
Please log in for more thread options >
> > I can't quite recall the printing term so please bear with me. =A0 When
> > you want your user to know that something is happening the app often
> > will print to the screen saying something like "load ...". =A0I want to
> > create the same sort of script that produce a "." or similar symbol
> > for each fraction of second that goes by. =A0If I knew the 'key' words
> > I'd search for it.
>
> print? Which part of the program are you having a problem with?
> Something like
>
> =A0 =A0 use Time::HiRes qw/sleep/;
>
> =A0 =A0 $| =3D 1;
>
> =A0 =A0 print 'loading';
>
> =A0 =A0 for (1..100) {
> =A0 =A0 =A0 =A0 sleep 0.1;
> =A0 =A0 =A0 =A0 print '.';
> =A0 =A0 }
>
> =A0 =A0 print "\n";
>
> works, but presumably you don't *just* want to mark the passage of time.
>
> Ben
Your code is almost exactly what I had. But what is the "$| =3D 1;"
for?
Mike
|