in reply to Range Operator Mysteries

How about this (untested):
my @data; my $count = 0; while (<FOO>) { /^=+$/ and $count++, next; push @{$data[$count]}, $_; }
Then you have a 2D array of sections and items in @data.