use File::Slurp; my $string = read_file("somefile.txt");