Debian Codegraph @

eg/cmd

raw
1 # ! /usr/local/bin/perl -w
2 #
3 # cmd - Another of a Tie::Cycle::Sinewave object, for which a
4 # number of parameters can be set from the command line
5 #
6 # This file is part of the Tie::Cycle::Sinewave perl extension
7 # Copyright (c) 2005 David Landgren. All rights reservered.
8
9 use strict;
10 use Tie::Cycle::Sinewave;
11
12 my $min = shift || 0;
13 my $max = shift || 100;
14 my $period = shift || 20;
15
16 tie my $c, 'Tie::Cycle::Sinewave', {
17 start_max => 1,
18 min => $min,
19 max => $max,
20 period => $period,
21 };
22
23 while( 1 ) {
24 printf "%10.2f\n";
25 select undef, undef, undef, 0.2;
26 }