mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-27 05:03:27 -08:00
Spaces tend to cause annoyances in a Unix-style shell environment. This change fixes that.
18 lines
339 B
Perl
Executable File
18 lines
339 B
Perl
Executable File
#!/usr/bin/perl
|
|
use strict;
|
|
use warnings;
|
|
|
|
print ' ' x 30 ."SINE WAVE\n";
|
|
print ' ' x 15 ."CREATIVE COMPUTING MORRISTOWN, NEW JERSEY\n";
|
|
print "\n\n\n\n\n";
|
|
|
|
my $B=0;
|
|
|
|
for (my $T=0; $T<40; $T+=.25) {
|
|
my $A=int(26+25*sin($T));
|
|
print ' ' x $A;
|
|
if ($B==0) { print "CREATIVE\n"; }
|
|
if ($B==1) { print "COMPUTING\n"; }
|
|
$B= !$B; #Toggle
|
|
}
|