in reply to Most efficient way to load file contents into scalar?

If copying the file (Copying how? With the OS? With a Perl read/print while-loop?) takes 20 seconds, this implies the file is lotsa gigabytes in size.

If this is the case, you're lucky it only takes 10 minutes to read it into a scalar! Symptom to look for: merciless disk thrashing while the file is read to the scalar.

Solution: don't do that! Process the file in pieces.