in reply to printing characters to specific position on screen
Try this:
#! perl use strict; use Win32::Console; my $cons = new Win32::Console( STD_OUTPUT_HANDLE ); $cons->Cls; $cons->WriteChar( 'Downstream: 0 Upstream: 0', 12, 3 ); my( $up, $dn ) = (0) x 2; for ( 1 .. 1000 ) { Win32::Sleep 100; $cons->WriteChar( $up += int rand 100, 24, 3 ); $cons->WriteChar( $dn += int rand 100, 40, 3 ); }
Obviously this won't work on *nix. You might find Win32::Console::ANSI makes it easier ot write a portable script.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: printing characters to specific position on screen
by Anonymous Monk on Aug 09, 2005 at 17:27 UTC |