in reply to Best way to append bigger files
Here is a try without File::Copy.
#!perl my $blocksize = (stat'.')[11] || 4096; open ( my $s, "<", "source" ) or die "Could not open source file: $!\n +"; open ( my $d , ">>", "dest" ) or die "Could not open destination file +: $!\n"; my $buffer; do { local $/ = \$blocksize; print {$d} $buffer while ( $buffer = <$s> ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Best way to append bigger files
by Anonymous Monk on Jul 24, 2012 at 17:01 UTC | |
by brx (Pilgrim) on Jul 24, 2012 at 17:21 UTC |