Goodday to all you Perlians ! The following situation: There is this flat text file of over 100 MB. Within this file I have to search for a piece of string. This string will be found at 2 places. The two lines of the file with this string will be dumped in an other file. I want to split the file in 10 pieces but do not want the 2 instances of the string in 2 different files (the entire file consists of these "pairs"). An other usefull thing to know is that the file can be split in 2 different files each with it's instance of a string.
example structure file: 2132133123|some data|blalala 4545354543|here we allso have some data 9687647767|Bla bla <><><><><> <><><><>< <><><> 4545354543|lkmasdlkasdlkasd|asdjnakjsasd|ajkbhdaksjdb| 9687647767|asdasdasd|233423|234234|@#$@#$#$@ 2132133123|some data|blalala|dsfmksdfsd|234324|@#$@ I know several ways to do this but will be the fastest way ?? 1) dump everything in the memory and do the matching over there 2) walk through the file for every string 3) split the file in 2 seperate files and dump those in the memory 4) split the files and dump a chunk of file1 in the memory, open/close file2 to do the matching 5) Some other way ...... Does anyone have an idea what will be the fastest ?? TIA, Jorn --------------------------------------------------------------------------- This message (including any attachments) is confidential and may be privileged. If you have received it by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorised use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change. ABN AMRO Bank N.V. (including its group companies) shall not be liable for the improper or incomplete transmission of the information contained in this communication nor for any delay in its receipt or damage to your system. ABN AMRO Bank N.V. (or its group companies) does not guarantee that the integrity of this communication has been maintained nor that this communication is free of viruses, interceptions or interference. --------------------------------------------------------------------------- _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs