MT_MANC has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: PERL TO SPLIT BIGFILE;SAVE TEXT EXTRACTS TO SEPERATE FILES
by BrowserUk (Patriarch) on Jan 12, 2012 at 16:29 UTC

    dir *.log File Not Found type junk.dat WinSolve log file created @ @ gRSH1p_u @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ [TRUNCATED SUBSECTION TEXT] @ Exit @ WinSolve log file created @ @ gOILp_u @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ [TRUNCATED SUBSECTION TEXT] @ Exit @ WinSolve log file created @ @ gTRX1p_u @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ [TRUNCATED SUBSECTION TEXT] @ Exit perl -e"BEGIN{$/='Exit'}" -nwle"($n)=m[@ (\S+) @] or next;$n.='.log';o +pen O,'>',$n; print O $_;close O" junk.dat dir *.log 12/01/2012 16:28 133 gOILp_u.log 12/01/2012 16:28 129 gRSH1p_u.log 12/01/2012 16:28 134 gTRX1p_u.log type gOILp_u.log @ WinSolve log file created @ @ gOILp_u @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ [TRUNCATED SUBSECTION TEXT] @

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

Re: PERL TO SPLIT BIGFILE;SAVE TEXT EXTRACTS TO SEPERATE FILES
by pvaldes (Chaplain) on Jan 12, 2012 at 16:23 UTC

    For each subsection: ------ Start String: "WinSolve log file created " End String: "Exit" File Name to Save Extracted subsection text to: Occurs on Line 3 of each subsection

    hint: read the file line by line, match anything between "WinSolve log file created" and "Exit", non greedy and print OUTPUT each matching to the output file.

    see perldoc perlretut

Re: PERL TO SPLIT BIGFILE;SAVE TEXT EXTRACTS TO SEPERATE FILES
by Anonymous Monk on Jan 12, 2012 at 16:06 UTC