in reply to Split Function

Based on what you've said, I suspect you may want to look at the $/ (input record separator) variable. If your code looks something like this:
open (PAGE, $filename) || die "Can't open $filename: $!"; my $text = <PAGE>; close PAGE || die "Can't close $filename: $!"; # parse $text somehow
then your error is that you're asking for only one line from the file. The magic variable $/ tells Perl which character comes at the end of a line, and the < filehandle > operator gets one line from that filehandle.

The solution might look something like this:

my $text; # outside of the block so it's in scope after we leav +e the block { local $/; open (PAGE, $filename) || die "Can't open $filename: $!"; $text = <PAGE>; close (PAGE) || die "Can't close $filename: $!"; }
That will temporarily undefine the input record separator and place the whole of $filename into $text. You can set $/ to anything you want, such as "\n--\n\n", if you have a better record separator in mind. ("&..&", from your example above.)