#!/usr/bin/perl -w use strict; use constant CR => "\r"; use constant NL => "\n"; my @x = qw(2 6 8 12); print "start"; $|++; foreach(@x) { print NL, "warte ....", CR; warte($_); print "$_ sekunden vorbei."; } sub warte{ my $wait = shift; my $t1 = time(); while(1) { my $t2 = time(); my $diff = $t2 - $t1; last if($diff == $wait); } }