JupiterHost.Net wrote:
> Hello list,
> 
> I've seen this done, but am not sure what its called or where to start
> looking...
> 
> Instead of the output of a script via CLI being:
> 
> # perl script.pl
> line1
> line2
> line3
> etc
> #
> 
> I'd like the line to change as it runs, sort of an animated delivery:
> 
> As soon as its run it'd look like this:
> # perl script.pl
> line1
> 
> and then change to this:
> # perl script.pl
> line2
> 
> and then change to this:
> # perl script.pl
> line3
> 
> And end up like this:
> # perl script.pl
> ect
> #
> 
> Does that make sense :) ??

Yes. Just print a \r to move the cursor back to the beginning of the line.

perl -e '$|=1; print "\rLine $_" and sleep 1 for 1..3; print "\n"'

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to