in reply to Parsing text sections

sub parse { my $self = shift; my $file = shift; open FILE,'<',$file || die "Can't open $file";

Your program will only die if the file name is omitted when you call parse() or if the file name is either "" or "0" because of the high precedence of the || operator.    You need to either use the low precedence or operator:

open FILE,'<',$file or die "Can't open $file";

Or use parentheses:

open( FILE,'<',$file ) || die "Can't open $file";

You should also include the $! variable in your error message so you know why the program failed:

open FILE,'<',$file or die "Can't open $file: $!";