my $g = q~ file: entry(s?) {$item[1]} entry: 'schluesselwort' /\d+/ '{' option(s?) '}' {[$item[2], $item[4]]} option: /[\w\d]+/ /[\w\d]+/ ';' {[$item[1], $item[2]]} ~;