in reply to Re: How to Put a Loop in my 1st Program
in thread How to Put a Loop in my 1st Program
Since you're treating all of the files as individual strings, you can do the undef $/; business.
I don't think so, you want to read the filenames stored in 'files.txt' line by line - which your solution doesn't do. So I'd go for something like this:
open(FH, 'filename') or die $!; my $text = do {local $/; <FH>}; close FH;
For a complete treatmeant of many possibilities and discussions on how to slurp a file read the very informative Slurp a file.
-- Hofmator
|
|---|