Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Refresh display in Perl

by l2kashe (Deacon)
on Jul 30, 2003 at 19:07 UTC ( #279327=note: print w/ replies, xml ) Need Help??


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;


Comment on Re: Refresh display in Perl
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://279327]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (13)
As of 2015-07-07 22:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls