Chris Devers wrote:
On Tue, 14 Sep 2004, JupiterHost.Net wrote:
I'd like the line to change as it runs, sort of an animated delivery:
I've seen a Damian Conway presentation where he faked out this behavior by prefixing all output with enough backspace ("\h") characters to wipe out the previous output and display a new line.
Sneaky :) I can't even seem to fake it:
$ perl -mstrict -we 'my @l = qw(abc 123 dfg);for(@l) { print "\h\h\h$_"; }print "\n";'
Unrecognized escape \h passed through at -e line 1.
Unrecognized escape \h passed through at -e line 1.
Unrecognized escape \h passed through at -e line 1.
hhhabchhh123hhhdfg
$
\h doesn't seem to act like \n does...
The "right" way to do this may be one of the Term::* modules, but this approach worked well enough to fool a room full of Perl mongers into thinking he was doing something much more clever than he really was...
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>