in reply to print all files is soo slow! Why?

Maybe its because autoflush is off, so try

use IO::Handle; STDOUT->autoflush(1);

but then cmd.exe is also slow, it doesn't like when you print lots and lots of stuff, so try redirecting output to a file perl yada.pl > yada.txt

Replies are listed 'Best First'.
Re^2: print all files is soo slow! Why? (autoflush, cmd.exe)
by harangzsolt33 (Deacon) on Jul 26, 2016 at 04:31 UTC

    Thank you, but that didn't solve the problem.

    I had a binary file in the folder, which is what messed up my program I guess. Somehow I overlooked it. I wasn't going to print binary files, only text files. And once I moved those binary files out into another folder, my program ran correctly.

    Instead of using print $CONTENT, I made a for loop that printed the characters one by one skipping thru all the special characters such tab, bell, new line, backspace, etc, and there was no more delay. So, that solved it.

    (As long as I read the binary files, everything was okay. But when I tried printing them, there was a lot of delay.)