in reply to Breaking huge text file apart

A couple of easy options.

If the file is small enough to fit in memory, then you could do something like this:

my $pattern = "----- blah de blah ----"; do_whatever($_) foreach split /$pattern/, join '', <> ;
If you don't want to read the whole thing into memory in one go, you could do something like this:
{ local $/ = "----- blah de blah ----"; while (my $this_section = <>) { chomp $this_section; do_whatever($this_section); } }
andy.