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