in reply to splitting a large text file and output

If you want to process an input file section by section, with sections separated by blank lines, you could consider reading the file in paragraph mode. You can do this by changing the default input record separator to an empty string as shown here.

knoppix@Microknoppix:~$ perl -E ' > open my $inFH, q{<}, \ <<EOD or die $!; > VECT > 111 > 222 > 333 > > VECT > 444 > 555 > 666 > 777 > > VECT > 888 > 999 > EOD > > { > local $/ = q{}; > while ( <$inFH> ) > { > print; > say q{=} x 20; > } > }' VECT 111 222 333 ==================== VECT 444 555 666 777 ==================== VECT 888 999 ==================== knoppix@Microknoppix:~$

I hope this is helpful.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: splitting a large text file and output
by 7stud (Deacon) on Jun 10, 2011 at 18:10 UTC
    lol. We both even used x 20!