gj2666 has asked for the wisdom of the Perl Monks concerning the following question:
So I was looking through "cool uses for perl" saw a posting with a "Text to animated pseudo-braille GIF" which looks like it would do a similar thing in a gif file. It got me thinking about it again.
So here's what I came up with but it's not very swanky and I have to do a system "cls"; between every display which makes the text flash as well (I'd use something besides cls if I knew how). I couldn't figure out any other way to control what line on the screen the sparkle sparkled on.
Any ideas? How could I make it better?# !cqperl (that's all I have here at work) use strict; use warnings; my $count = 0; my @sparkle = qw(\ | / - |); while ($count < 100 ){ my $thingy=shift(@sparkle); system"cls"; print "This is a sparkle: $thingy\n"; sleep .99; push(@sparkle, $thingy); $count++; }
Thanks, Gretchen
(aka sparkle farkle) - Oh yeah? Well, if you get the ref you're that old too!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Creating a Sparkle in perl
by ikegami (Patriarch) on Dec 29, 2005 at 20:15 UTC | |
|
Re: Creating a Sparkle in perl
by McDarren (Abbot) on Dec 30, 2005 at 00:02 UTC | |
|
Re: Creating a Sparkle in perl
by renodino (Curate) on Dec 29, 2005 at 20:23 UTC | |
|
Re: Creating a Sparkle in perl
by jdhedden (Deacon) on Dec 30, 2005 at 14:45 UTC | |
by jdhedden (Deacon) on Sep 07, 2007 at 20:00 UTC | |
|
Re: Creating a Sparkle in perl
by liverpole (Monsignor) on Dec 30, 2005 at 16:56 UTC |