⭐ in reply to How do I read an entire file into a string?
my $size = 2000; # or whatever open( FH, "sample.txt") or die("Error: $!\n"); read( FH, $data, $size ); close FH; [download]