I just started to take a intro to perl course. So we get the hello world example for HW. So I decided to have fun with it a bit. Below are 2 examples in one script of how to do "HELLO WORLD!" that print a tad bit funky.
#!/user/local/bin/perl -w
#hello world twice funky
use strict;
my @hello=('H','E','L','L','O',' ','W','O','R','L','D','!');
my $i = 0;
foreach my $var(@hello){
while($i < 10000){
my @letters = ('A'..'Z');
my $m = $letters[int rand @letters];
print "$m\b";
$i++
}
$i = 0;
print $var;
}
@hello = reverse(@hello);
print "\n ";
foreach my $var(@hello){
print "\b\b";
sleep 1;
$i++;
print $var;
}
LeGo