in reply to Re: Letter by letterin thread Letter by letter
Ah, in that case, I think you were mostly on the right track except with the buffering thing and the end case for the for loop.
$| = 1; foreach my $letter (split '', $string) { print $letter; sleep 1; } [download]
Somewhat obscure, but I think the following is cute:
sleep($|=print) for split '', $string; [download]
print returns 1 if it's successful.