It should be easy to slurp a file. I could think of plenty of ways to do it, but it took a while to come up with something comparable with perl slurping.
Here's a rough evolution of my slurp-stream function. You can do anything you like with the code. It's there so you don't have to go through the discovery process I went through.
[Source and copyright www.emmett.ca/~sabetts/slurp.html]