#!/usr/bin/perl -w use strict; use Curses; $SIG{'INT'} = sub {endwin; exit(0);}; initscr; cbreak; noecho; clear; for (my $i = 0;;$i++) { if ($i % 2) { addstr(0, $i % 80, '%-'); } else { addstr(0, $i % 80, '%<'); } select(undef, undef, undef, 0.25); # sleep for 1/4 second addstr(0, ($i - 2) % 80, ' '); move(1, 0); refresh; } __END__ =pod =head1 NAME rws -- Running With Scissors =head1 SYNOPSIS B<rws> =head1 DESCRIPTION Trolls for a response from Randal. Press the interrupt key (usually Ctrl-C) to quit. =head1 INSTALLATION You may have to change the first line if B<Perl> is not in F</usr/bin> + on your system. You will also need the B<Curses.pm> module (which is in +the F<libcurses-perl> package in Debian GNU/Linux.) Other than that, just make the script executable and you are ready to go. =head1 BUGS Assumes terminal line length is 80 -- itself an example of running wit +h scissors! =head1 AUTHOR Jaldhar H. Vyas E<lt>jaldhar@braincells.comE<gt> =head1 LICENSE This code is free software under the Crowley Public License ("Do what thou wilt shall be the whole of the license") =head1 VERSION 1.0 -- Aug 5, 2000 =cut

Replies are listed 'Best First'.
RE: Running With Scissors
by merlyn (Sage) on Aug 06, 2000 at 07:17 UTC