good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Trying to make a simple countdown timerby Your Mother (Archbishop) |
on Aug 29, 2020 at 03:55 UTC ( [id://11121177]=note: print w/replies, xml ) | Need Help?? |
It’s goofy but I use this in front of commands that I want a moment to reconsider whether or not I really meant to run it– perl -e '$|++; sleep 1 && printf "\r%2d...", $_ - 1 for reverse 1 .. 10; print $/'I think the order with the \r is actually “buggy” / “off-by-one” so if someone clever wants to revamp/improve. Dot, dot, dot. :P Anything longer than a minute these days Alexa and Siri got my back.
In Section
Seekers of Perl Wisdom
|
|