use strict; print "Prompt: "; my $end = time() + 10; my $input; while ($end > time()) { $input .= ; } my @words = split /\s+/, $input; print "$_\n" foreach @words;