in reply to File parsing

There are a couple of tricks that you can use to make this a fairly simple problem. First is you can set the special variable $/ to '=================' to read a block at a time:

open my $inFile, '<', $filename or die "Failed to open $filename: $!\n +"; local $/ = '================='; while (defined (my $record = <$inFile>)) { chomp $record; ... }

You can then split the record using "\n" to get a list of lines:

my @lines = split "\n", $record;

Perl reduces RSI - it saves typing