in reply to read file into scalar

I often to this:

my $text = do { local( @ARGV, $/ ) = ( $file ); <> };

although it's not as robust as the other solutions which die on error.

We're building the house of the future together.