in reply to Prepending header line to HUGE csv file
$/ = \65535; # You can try different numbers here. print {$NEW} $header; print {$NEW} $_ while <$OLD>;
Update: it seems read is a bit faster on my system. YMMV.
print {$NEW} $_ while read $OLD, $_, 2 ** 30 - 1;
|
|---|