The path to enlightenment
16. October 2010
16. October 2010
#!/usr/bin/perl $height = `tput lines`; @lines = ('\\', '|', '/'); $last_line = 30; while(!$enlightened){ system 'clear'; foreach(1..$height){ $the_spot = abs($_ - ($height)); $the_line = int(rand(scalar @lines)); system 'tput', 'cup', $the_spot, $last_line; print $lines[$the_line]; $last_line += $the_line-1; select(undef, undef, undef, 0.25); } }