Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Merge remote branch 'perl-doc-cats/master'

  • Loading branch information...
commit 3cb18d571823c112c99ec65e9b259aa846c713f5 2 parents eb40f1c + 9fb8492
@ranguard ranguard authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/perlfaq4.pod
  2. +2 −2 lib/perlfaq5.pod
4 lib/perlfaq4.pod
@@ -1266,8 +1266,8 @@ for list operations, so list operations also work on arrays:
wash_animals( qw( dog cat bird ) );
wash_animals( @animals );
-Array operations, which change the scalars, rearranges them, or adds
-or subtracts some scalars, only work on arrays. These can't work on a
+Array operations, which change the scalars, rearrange them, or add
+or subtract some scalars, only work on arrays. These can't work on a
list, which is fixed. Array operations include C<shift>, C<unshift>,
C<push>, C<pop>, and C<splice>.
4 lib/perlfaq5.pod
@@ -194,11 +194,11 @@ you can fit the whole thing in memory!):
open my $in, '<', $file or die "Can't read old file: $!"
open my $out, '>', "$" or die "Can't write new file: $!";
- my @lines = do { local $/; <$in> }; # slurp!
+ my $content = do { local $/; <$in> }; # slurp!
# do your magic here
- print $out @lines;
+ print $out $content;
Modules such as L<File::Slurp> and L<Tie::File> can help with that
too. If you can, however, avoid reading the entire file at once. Perl

0 comments on commit 3cb18d5

Please sign in to comment.
Something went wrong with that request. Please try again.