in reply to Re: Re: Re: Re: Re: opening a file in a subroutine
in thread opening a file in a subroutine

OK, I tested this with v5.8.0 built for i386-linux-thread-multi.

Test data was a 32M, 2.5 million line file.
Machine is a 1740Mhz Althon, 512Mb real memory, 768Mb swap.

Results:

my_slurp: Try 1 Took 11 seconds. Try 2 Took 16 seconds. Try 3 Took 15 seconds. my_while: Try 1 Took 4 seconds. Try 2 Took 5 seconds. Try 3 Took 4 seconds. my_file: Try 1 Took 33 seconds. Try 2 Took 19 seconds. Try 3 Took 14 seconds.

If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.