Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Let me say first I've visisted this site for a long time: you guys are a great font of knowledge the the n00b programmer like myself.
And with that...
I am working a program at my internship for processing some huge text files(1.5 gig ish). The goal is to split the file into 200mb chunks for use in other programs.
Searching google we found some code to use that works well for splitting files ( "http://search.cpan.org/src/CWEST/ppt-0.14/bin/split" )
My question comes at the part...
while (read (INFILE, $chunk, $count) == $count) { $fh = nextfile ($prefix); print $fh $chunk; }
I want to edit this so that, when it hits the chunk size, it will keep going UNTIL it hits a certain string. Where it will then resume creating another chunk.
My confusion comes with how that while loop flag condition works. My experience with Perl ended before ever seeing something like this.
I would be grateful to be pointed to some resource or something to look up to set me in the right direction. As, well, I really would like to know what the heck I'm doing...heh...
Thanks,
Mertz
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File Processing...
by GrandFather (Saint) on Mar 20, 2006 at 00:39 UTC | |
|
Re: File Processing...
by ayrnieu (Beadle) on Mar 20, 2006 at 00:08 UTC | |
by Anonymous Monk on Mar 20, 2006 at 01:55 UTC | |
|
Re: File Processing...
by TedPride (Priest) on Mar 20, 2006 at 06:29 UTC |