my $len = 1024; while (!eof(FILE)) { my $scalar; read(FILE, $scalar, $len); print $scalar; }