[svn:perlfaq] r10926 - perlfaq/trunk
[email protected] Sun, 16 Mar 2008 13:08:58 -0700 (PDT)
| Newsgroups | perl.cvs.perlfaq |
|---|---|
| Message-ID | <[email protected]> |
Author: comdog Date: Sun Mar 16 13:08:57 2008 New Revision: 10926 Modified: perlfaq/trunk/perlfaq5.pod Log: * How can I read in an entire file all at once? + Fixed typo Modified: perlfaq/trunk/perlfaq5.pod ============================================================================== --- perlfaq/trunk/perlfaq5.pod (original) +++ perlfaq/trunk/perlfaq5.pod Sun Mar 16 13:08:57 2008 @@ -955,7 +955,7 @@ use File::Slurp; $all_of_it = read_file($filename); # entire file in scalar - @all_lines = read_file($filename); # one line perl element + @all_lines = read_file($filename); # one line per element The customary Perl approach for processing all the lines in a file is to do so one line at a time: