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

Running With Scissors

by jaldhar (Vicar)
on Aug 06, 2000 at 07:08 UTC ( #26394=perlcraft: print w/ replies, xml ) Need Help??

   1: #!/usr/bin/perl -w
   2: use strict;
   3: use Curses;
   4:  
   5: $SIG{'INT'} = sub {endwin; exit(0);}; 
   6: 
   7: initscr;
   8: cbreak;
   9: noecho;
  10: clear;
  11: 
  12: for (my $i = 0;;$i++)
  13: {
  14:   if ($i % 2)
  15:   {
  16:     addstr(0, $i % 80, '%-');
  17:   }
  18:   else
  19:   {
  20:     addstr(0, $i % 80, '%<');
  21:   }
  22:   select(undef, undef, undef, 0.25); # sleep for 1/4 second
  23:   addstr(0, ($i - 2) % 80, '  ');
  24:   move(1, 0);
  25:   refresh;
  26: }
  27:  
  28: __END__
  29:  
  30: =pod
  31:  
  32: =head1 NAME
  33:  
  34: rws -- Running With Scissors
  35:  
  36: =head1 SYNOPSIS
  37:  
  38: B<rws>
  39:  
  40: =head1 DESCRIPTION
  41:  
  42: Trolls for a response from Randal.  Press the interrupt key (usually 
  43: Ctrl-C) to quit. 
  44:  
  45: =head1 INSTALLATION
  46:  
  47: You may have to change the first line if B<Perl> is not in F</usr/bin> on
  48: your system.  You will also need the B<Curses.pm> module (which is in the
  49: F<libcurses-perl> package in Debian GNU/Linux.) Other than that, just
  50: make the script executable and you are ready to go.
  51:  
  52: =head1 BUGS
  53:  
  54: Assumes terminal line length is 80 -- itself an example of running with
  55: scissors!
  56:  
  57: =head1 AUTHOR
  58:  
  59: Jaldhar H. Vyas E<lt>jaldhar@braincells.comE<gt>
  60:  
  61: =head1 LICENSE
  62:  
  63: This code is free software under the Crowley Public License ("Do what
  64: thou wilt shall be the whole of the license")
  65:  
  66: =head1 VERSION
  67:  
  68: 1.0 -- Aug 5, 2000
  69: 
  70: =cut

Comment on Running With Scissors
Download Code
RE: Running With Scissors
by merlyn (Sage) on Aug 06, 2000 at 07:17 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (13)
As of 2014-07-28 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (200 votes), past polls