Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Refresh display in Perl

by l2kashe (Deacon)
on Jul 30, 2003 at 19:07 UTC ( [id://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;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-24 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found