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

Using Path::Tiny:
my $contents = path($file_path)->slurp;