in reply to Putting file contents into a scalar

Yeah, it's legal. I think.

The way I'd do it, if I had to, would be something like:

my $contents; while (<FILE>) { $contents .= $_; }

Note that I haven't tested that, though .. but I can't see why it shouldn't work.

Hope that helps ..
--Foxcub