Slurp a file into a scalar.
Jean-Daniel Gamache
webmaster@perls.org
open (IN, "<myfile.txt"); {local $/; $file_content = <IN>;} print $file_content;
Back to
Cool Uses for Perl
open (IN, "<myfile.txt"); {local $/; $file_content = <IN>;} print $file_content;