develooper Front page | perl.beginners | Postings from August 2009

Re: Code for making the 'clock'

Thread Previous
From:
Shawn H. Corey
Date:
August 19, 2009 08:27
Subject:
Re: Code for making the 'clock'
Message ID:
4A8C19E7.4050408@gmail.com
Tony Esposito wrote:
> Anyone have the code that make the 'clock' show when a Perl program is running?
> What I mean by the 'clock' is the command-line movement that sequentially does the following (in place):
> 
> - \ | / - \ | / 
> 
> when running it looks like a 'clock' to show the user that something is processing ...
> Thx.
> 

Use the backspace '\\b' to back up and over-print the characters.  See 
`perldoc perlop` under "Quote and Quote-like Operators" and search for /\\b/

Also see `perldoc -f sleep` to slow it down. :)


-- 
Just my 0.00000002 million dollars worth,
   Shawn

Programming is as much about organization and communication
as it is about coding.

I like Perl; it's the only language where you can bless your
thingy.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About