#!/usr/bin/perl -w use strict; my @sections = split 'FOO', do {local $/; <>}; close *ARGV; print join("\n", @sections);