in reply to Perl's poor disk IO performance

Change open (FILE, "$path") to open (FILE, '<:raw', "$path").

On my system, with that change, your code reading 10MB, takes .38 seconds.