> He'd never seen the spinny cursor and was quite impressed - quite sad
really!
*grin*
I'll admit they're cute :)
Great story though; I'll have to remember that as an easy way to impress
people.
Dave
l Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]]
Sent: 13 June 2001 19:33
To: [EMAIL PROTECTED]
Subject: RE: A Term::ReadKey question -- keep cursor put!
Bear in mind that without any sort of delay it's unlikely
you'll be able to see any of this occuring.
Ah, the good old
: "Evgeny Goldin (aka Genie)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 13, 2001 6:37 PM
Subject: RE: A Term::ReadKey question -- keep cursor put!
>
> Hey, thank's for the answers !
> Although, I didn't ask the question but I was occas
Hey, thank's for the answers !
Although, I didn't ask the question but I was occasionally thinking
about it. "\r" and "\b" - great !
As once I was pointed to the ASCII character causing the printer to
start a new page .. Btw, I've forgot it - does anybody know it ?
11 ?
> I'm very new to perl (a
[mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 11:33
To: [EMAIL PROTECTED]
Subject: RE: A Term::ReadKey question -- keep cursor put!
Bear in mind that without any sort of delay it's unlikely
you'll be able to see any of this occuring.
Ah, the good old days, where a 300-baud
Bear in mind that without any sort of delay it's unlikely
you'll be able to see any of this occuring.
Ah, the good old days, where a 300-baud modem was fast
and little spinny cursors were still interesting. *sigh*
Dave
--
Dave Newton, [EMAIL PROTECTED]
Hi Matt
The \r option works fine, but an alternative is to use 'print "\b"' - this
will print a backspace character, and means you can have other stuff on the
line too. Try:
$|=1; for ($i=0; $i<10; $i++) {print "$i\b";sleep 1}
This method only works for single digit numbers though, since
On Wed, 13 Jun 2001, Pate Mark-marpate1 wrote:
> I'm very new to perl (a week or so), so this may not be the best way to do
> this, but
>
> for ($i=0; $i<10; $i++) {printf "%d\r",$i;}
Just to point out a more Perlish way to do this, rather the C-ish way
(since we're doing Perl and not C):
p
e this is what you wanted
Mark
-Original Message-
From: Matt Cauthorn [mailto:[EMAIL PROTECTED]]
Sent: 13 June 2001 13:21
To: [EMAIL PROTECTED]
Subject: A Term::ReadKey question -- keep cursor put!
I'm trying something like:
for ($i=0; $i<10; $i++){print $i;}
and have
I'm trying something like:
for ($i=0; $i<10; $i++){print $i;}
and have the numbers iterate in ONE PLACE at the cursor (i.e. print, then backspace,
print the new number, etc). I'm having problems figuring this out. Any ideas?
Thanks
Matt
__
Do Y
10 matches
Mail list logo