{ undef $/; @temp = split /;/, ; # slurp file shift @temp; # Get rid of everything before first semicolon %sections = map { my($sect, @param) = split /[\n\r\f]+/;($sect, \@param) } @temp; } # Just to test it foreach (keys %sections) { print "$_ => [@{$sections{$_}}]\n"; } __DATA__ ;section1 foo bar ;section2 bar baz