On Wednesday, Nov 12, 2003, at 18:07 US/Pacific, david wrote: [..]
like count down from 5 to 1 slowly in a single row? try:
[panda]# perl -e '$|=1; print " @{[6-$_]}\r" and sleep(1) for(1..5)'
david
Minor Nit, that "\r" will not actually go out
54321
rather pleasantly returns the cursor to the first position since you were polite enough to leave a space out in front!
Also a lovely way of helping the OP move from 'c style'
for( my $i=1; $i <= 5; $i++)
into the more natural perlish
for(N..M)
construct, but you really should have forewarned him a
bit about our habit of the compound statement before
the interative, vice the more easy to 'fix'
my $max = 6;
my $sleeptime=1;
for(1..5)
{
print " @{[$max-$_]}\r" ;
sleep($sleeptime);
}but props for the golf tip.....
Any help with my slice, I keep putting the ball way off to the other fairway....
ciao drieux
---
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
