in reply to How do I read an entire file into a string?
Be sure to read the "slurp_article", available in the distro under "Documentation" (i.e. under the "extras" directory).use strict; use File::Slurp; my $text = read_file($file);
And remember that if you cut and paste sample code from a web page, some of the punctuation characters may not be formatted for your system so if you get an error from cut and pasted code try typing it in directly to your program.
|
---|