http://qs321.pair.com?node_id=279327


in reply to Refresh display in Perl

The above suggestions are good. If you are sure the command will be run in a terminal you could do

#!/usr/bin/perl use strict; my $cmd = '/bin/who'; # or wherever it is on your system my $clear = '/bin/clear'; my $sleep = '10' while (1) { system("$clear"); # clear the display system("$cmd"); # send the command to STDOUT sleep($sleep); # sleep a bit }

use perl;