in reply to What eats up less resources?

As others have pointed out, you should try benchmarking some test code if execution speed or efficiency are your concerns. Some benchmarking examples can be found through Super Search. I posted a Benchmarking Quiz not long ago that has some examples.

However, you should also take into consideration your available resources and their relative strengths and weaknesses (e.g., slow disk, i/o, RAM available, CPU utilization, etc.). If you have scads of RAM and CPU cycles, slurp and burp!

Most of my "work" perl code is on a Sparc Enterprise 450 with 1GB of RAM that is primarily an E-mail server, so I routinely slurp text files 5MB+ with no noticeable impact on performance or resources. It's relative to your environment.

--Jim