I'd use Text::CSV_XS to read the CSV file. I'd read the file you're trying to change a little at a time, looking for the delimiter, and insert the CSV records when I find it.
my $record_end = qq{\$\$\$\$\n}; while (<DATAFILE>) { next if ( $_ ne $record_end ); # insert stuff from CSV here } continue { print OUT; }
You don't have to read all of any file at once or even mess around with regular expressions.
In reply to Re: Appending data to large files
by kyle
in thread Appending data to large files
by joec_
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |