File::Slurp allows you read a filehandle into a scalar.
However there is another way to do this without having to load an extra module at runtime.
The select statement changes $/ (the input record separator) to a null character instead of a \n. And there you go..
#!/usr/bin/perl
my $file="foobar";
open (FILE, $file) or
die "Can't open $file: $!\n";
select((select(FILE), $/ = undef)[0]);
my $contents = <FILE>;
close (FILE);
But now you've built an array just to discard it when you create the string. So, you win points for "easy to type", but lose points for "wasteful implementation".