> How would I go about reading in an external file and then > based on the search criteria write out individual files. > Basically I want to split one big chunk into smaller chunks. > > The file gets opened and then I want to search for the first > occurence of <start> and pickup up everything until I hit > <end> (the <start> and <end> text would have to be inserted > into the external file also) and then write everything (see > below) into an external file that would, I guess, increment > the filenames (ext1.txt, ext2.txt, ext3.txt etc.) > > Then the program would continue and search for the next > occurrence of <start> to <end> and write that out to a file > and so on until the EOF is reached. > > Is this simple to do? I'm totally new to Perl so I have no > idea where to start. > > <start> > ... > ... > ... > ... > ... > <end>
First try to write some pseudo code that shows some sort of logical design. Then try to write some code based on that. If you are really new to Perl, then it is time to start reading and coding. Post back when you get stuck here are some docs that you might need perldoc perlintro perldoc perlopentut perldoc perlre perldoc perlsyn --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.786 / Virus Database: 532 - Release Date: 10/29/2004 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>