It don't look much like perl, what's EOF?
What you are trying is actually quite awkward.
file reads/writes are generally buffered.
i.e. the OS likes to grab and print in blocks
to save disk/terminal operations as they are quite expensive.
output is usually line buffered. It likes to print a line
at a time.
you need to set auto flush otherwise printing is buffered
i.e. saves chars until a new line char
try this:
Code:
#!/bin/perl -w
undef local $/; # grab whole file see: perldoc perlvar
local $| = 1; # set autoflush see: perldoc perlvar
foreach (split '', <>)
{
print ;
sleep(1) ;
}