codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  File Splitter code in perl  vasanthi.ak at 06:09 on Thursday, June 04, 2009
 

Hi All

I have a file which is quite huge and I need to split the file in different files based on some of the keywords (which is at the beginning and at the end).
I am very new to Perl and I am still in learning phase, but I need to implement this in one of the projects I have.

The file looks as shown below. I want a perl script code to split the file into multiple files starting from

PRFA: Profiling is enabled to
PRFA: Profiling is disabled


PRFA: Profiling is enabled
PRFA-LOG Ticks/Sec Overhead Base PRFA-LOG
PRFA-LOG ----------------------------- PRFA-LOG
PRFA-LOG # 1004 0 10 PRFA-LOG
!#!1!1 754 1241523021822!1 14 1241523021822!1 30 1241523021822!
!#!2!1 -30 1241523021822!1 -14 1241523021918!1 4 1241523021919!
!#!3!1 770 1241523021929!1 -770 1241523021942!1 -4 1241523021942!
!#!4!1 742 1241523021943!1 -742 1241523021943!1 62 1241523021943!
!#!5!1 18 1241523021943!1 24 1241523021943!1 -24 1241523021943!
!#!6!1 -18 1241523021943!1 22 1241523021943!1 -22 1241523021943!
!#!7!1 28 1241523021943!1 24 1241523021943!1 -24 1241523021943!
PRFA: Profiling is disabled
PRFA: Profiling is enabled
PRFA-LOG Ticks/Sec Overhead Base PRFA-LOG
PRFA-LOG ----------------------------- PRFA-LOG
PRFA-LOG # 1004 0 10 PRFA-LOG
!#!1!1 754 1241523025462!1 14 1241523025462!1 30 1241523025462!
!#!2!1 -30 1241523025462!1 -14 1241523025557!1 4 1241523025558!
!#!3!1 770 1241523025568!1 -770 1241523025581!1 -4 1241523025581!
!#!4!1 742 1241523025581!1 -742 1241523025581!1 62 1241523025581!
!#!5!1 18 1241523025581!1 24 1241523025581!1 -24 1241523025581!
!#!6!1 -18 1241523025581!1 22 1241523025581!1 -22 1241523025581!
!#!7!1 28 1241523025581!1 24 1241523025581!1 -24 1241523025581!
!#!8!1 -28 1241523025581!1 -62 1241523025581!1 402 1241523025581!
!#!9!1 -402 1241523025581!1 742 1241523025581!1 -742 1241523025582!
!#!10!1 62 1241523025582!1 18 1241523025582!1 24 1241523025582!
PRFA: Profiling is disabled
PRFA: Profiling is enabled
PRFA-LOG Ticks/Sec Overhead Base PRFA-LOG
PRFA-LOG ----------------------------- PRFA-LOG
PRFA-LOG # 1004 0 10 PRFA-LOG
!#!1!1 754 1241523029058!1 14 1241523029058!1 30 1241523029058!
!#!2!1 -30 1241523029058!1 -14 1241523029157!1 4 1241523029158!
!#!3!1 770 1241523029167!1 -770 1241523029180!1 -4 1241523029180!
!#!4!1 742 1241523029180!1 -742 1241523029180!1 62 1241523029180!
!#!5!1 18 1241523029180!1 24 1241523029180!1 -24 1241523029180!
!#!6!1 -18 1241523029180!1 22 1241523029180!1 -22 1241523029180!
!#!7!1 28 1241523029180!1 24 1241523029180!1 -24 1241523029180!
!#!8!1 -28 1241523029180!1 -62 1241523029180!1 402 1241523029180!
PRFA: Profiling is disabled


Please help me in this regard
Vasanthi A


  Re: File Splitter code in perl  hermanningjaldsson at 17:28 on Thursday, June 04, 2009
 

Sorry but you must do your own homework.










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
• C++
• Re: refresh parent after closing pop up window
• Dynamic Insertion
• Date and Time function around the world???
• Significant Factors
• Perl array access
• Re: huffman encoding and decoding in C++...
• Perl One Liner: Replace {(
• Re: html including php, accessing the functions


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2009