in reply to Record separator question

Chris,
Take a look at perldoc perlvar.

Remember: the value of $/ is a string, not a regex. awk has to be better for something. :-)

Ok - so my suggestion would be to slurp in the entire thing and then split on your regex.

local $/ = undef; my $record = <INPUT>; my @chunks = split /regex/ , $record; for my $chunk ( @chunks ) { my @lines = split /\n/ , $chunk; }
Hope that helps - L~R

Update: If for some reason you need to keep the header information - do something like this:

local $/ = undef; my $record = <INPUT>; my @chunks = split /(regex)/ , $record; while ( @chunks ) { my $header = shift; my $chunk = shift; my @lines = split /\n/ , $chunk; }