in reply to Examples of top command written in Pure PERL

Here's three options:

  1. Use watch(1). It's fairly standard on linux (I think). It will run a perl script periodically. A problem is it won't allow scrolling (or any interaction).
  2. Use Curses.pm Here's an example I wrote for RosettaCode.org https://rosettacode.org/wiki/Tetris#Perl
  3. Use ANSI control sequences. Again, here's an example I wrote for RosettaCode.org https://rosettacode.org/wiki/Forest_fire#Alternate_Perl_Solution
I'm sorry I don't have any really short examples :(

  • Comment on Re: Examples of top command written in Pure PERL

Replies are listed 'Best First'.
Re^2: Examples of top command written in Pure PERL
by davidfavor (Initiate) on Jan 26, 2022 at 16:07 UTC
    Thanks! I'll check these out.