Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
But instead of prepending the line, it is replacing the existing lines!! i.e.$output_filename="text_file.csv"; open (FH, "+< $output_filename") or die "can't open"; my $line =<FH>; seek FH, 0,0; print FH "This is my header \n".$line;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Prepending header line to HUGE csv file
by Laurent_R (Canon) on Oct 30, 2015 at 14:58 UTC | |
|
Re: Prepending header line to HUGE csv file
by choroba (Cardinal) on Oct 30, 2015 at 14:59 UTC | |
|
Re: Prepending header line to HUGE csv file
by hippo (Archbishop) on Oct 30, 2015 at 15:12 UTC | |
|
Re: Prepending header line to HUGE csv file
by BrowserUk (Patriarch) on Oct 30, 2015 at 18:16 UTC | |
|
Re: Prepending header line to HUGE csv file
by graff (Chancellor) on Oct 31, 2015 at 05:15 UTC | |
|
Re: Prepending header line to HUGE csv file
by shmem (Chancellor) on Oct 31, 2015 at 11:22 UTC |