in reply to How do I read an entire file into a variable?
open FILE "myfile"; my $data = join "", <FILE>; close FILE; [download]
...but of course, there's more than one way to do it.