in reply to How do I read an entire file into a variable?

I usually do it slightly differently:
open FILE "myfile"; my $data = join "", <FILE>; close FILE;

...but of course, there's more than one way to do it.