#!/usr/bin/perl ### ### (C) Thomas Köhler ### ### Released under GPLv2 ### ### URL: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/shell/ ### this script: http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/shell/countdown ### use Time::HiRes qw(usleep); my $START=time(); my $END=$START; my $count=$ARGV[0] || 10; if($count < 0) { $count = -$count; } $|=1; my $start ="807"; print "7"; print "Starting countdown of $count seconds...\n"; print "7"; while($END-$START < $count) { print "$start"; print $count-$END+$START; print " seconds "; usleep(100000); $END=time(); } print "$start"; print "done. \n";